1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/classify.api.json
7 // Package classify contains generated bindings for API file classify.api.
19 api "git.fd.io/govpp.git/api"
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 = 0x13587952
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 // IfStatusFlags defines enum 'if_status_flags'.
96 type IfStatusFlags uint32
99 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
100 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
104 IfStatusFlags_name = map[uint32]string{
105 1: "IF_STATUS_API_FLAG_ADMIN_UP",
106 2: "IF_STATUS_API_FLAG_LINK_UP",
108 IfStatusFlags_value = map[string]uint32{
109 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
110 "IF_STATUS_API_FLAG_LINK_UP": 2,
114 func (x IfStatusFlags) String() string {
115 s, ok := IfStatusFlags_name[uint32(x)]
119 str := func(n uint32) string {
120 s, ok := IfStatusFlags_name[uint32(n)]
124 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
126 for i := uint32(0); i <= 32; i++ {
136 return str(uint32(x))
141 // IfType defines enum 'if_type'.
145 IF_API_TYPE_HARDWARE IfType = 1
146 IF_API_TYPE_SUB IfType = 2
147 IF_API_TYPE_P2P IfType = 3
148 IF_API_TYPE_PIPE IfType = 4
152 IfType_name = map[uint32]string{
153 1: "IF_API_TYPE_HARDWARE",
154 2: "IF_API_TYPE_SUB",
155 3: "IF_API_TYPE_P2P",
156 4: "IF_API_TYPE_PIPE",
158 IfType_value = map[string]uint32{
159 "IF_API_TYPE_HARDWARE": 1,
160 "IF_API_TYPE_SUB": 2,
161 "IF_API_TYPE_P2P": 3,
162 "IF_API_TYPE_PIPE": 4,
166 func (x IfType) String() string {
167 s, ok := IfType_name[uint32(x)]
171 return "IfType(" + strconv.Itoa(int(x)) + ")"
174 // LinkDuplex defines enum 'link_duplex'.
175 type LinkDuplex uint32
178 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
179 LINK_DUPLEX_API_HALF LinkDuplex = 1
180 LINK_DUPLEX_API_FULL LinkDuplex = 2
184 LinkDuplex_name = map[uint32]string{
185 0: "LINK_DUPLEX_API_UNKNOWN",
186 1: "LINK_DUPLEX_API_HALF",
187 2: "LINK_DUPLEX_API_FULL",
189 LinkDuplex_value = map[string]uint32{
190 "LINK_DUPLEX_API_UNKNOWN": 0,
191 "LINK_DUPLEX_API_HALF": 1,
192 "LINK_DUPLEX_API_FULL": 2,
196 func (x LinkDuplex) String() string {
197 s, ok := LinkDuplex_name[uint32(x)]
201 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
204 // MtuProto defines enum 'mtu_proto'.
208 MTU_PROTO_API_L3 MtuProto = 1
209 MTU_PROTO_API_IP4 MtuProto = 2
210 MTU_PROTO_API_IP6 MtuProto = 3
211 MTU_PROTO_API_MPLS MtuProto = 4
212 MTU_PROTO_API_N MtuProto = 5
216 MtuProto_name = map[uint32]string{
217 1: "MTU_PROTO_API_L3",
218 2: "MTU_PROTO_API_IP4",
219 3: "MTU_PROTO_API_IP6",
220 4: "MTU_PROTO_API_MPLS",
221 5: "MTU_PROTO_API_N",
223 MtuProto_value = map[string]uint32{
224 "MTU_PROTO_API_L3": 1,
225 "MTU_PROTO_API_IP4": 2,
226 "MTU_PROTO_API_IP6": 3,
227 "MTU_PROTO_API_MPLS": 4,
228 "MTU_PROTO_API_N": 5,
232 func (x MtuProto) String() string {
233 s, ok := MtuProto_name[uint32(x)]
237 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
240 // PolicerClassifyTable defines enum 'policer_classify_table'.
241 type PolicerClassifyTable uint8
244 POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1
245 POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2
246 POLICER_CLASSIFY_API_TABLE_L2 PolicerClassifyTable = 3
250 PolicerClassifyTable_name = map[uint8]string{
251 1: "POLICER_CLASSIFY_API_TABLE_IP4",
252 2: "POLICER_CLASSIFY_API_TABLE_IP6",
253 3: "POLICER_CLASSIFY_API_TABLE_L2",
255 PolicerClassifyTable_value = map[string]uint8{
256 "POLICER_CLASSIFY_API_TABLE_IP4": 1,
257 "POLICER_CLASSIFY_API_TABLE_IP6": 2,
258 "POLICER_CLASSIFY_API_TABLE_L2": 3,
262 func (x PolicerClassifyTable) String() string {
263 s, ok := PolicerClassifyTable_name[uint8(x)]
267 return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
270 // RxMode defines enum 'rx_mode'.
274 RX_MODE_API_UNKNOWN RxMode = 0
275 RX_MODE_API_POLLING RxMode = 1
276 RX_MODE_API_INTERRUPT RxMode = 2
277 RX_MODE_API_ADAPTIVE RxMode = 3
278 RX_MODE_API_DEFAULT RxMode = 4
282 RxMode_name = map[uint32]string{
283 0: "RX_MODE_API_UNKNOWN",
284 1: "RX_MODE_API_POLLING",
285 2: "RX_MODE_API_INTERRUPT",
286 3: "RX_MODE_API_ADAPTIVE",
287 4: "RX_MODE_API_DEFAULT",
289 RxMode_value = map[string]uint32{
290 "RX_MODE_API_UNKNOWN": 0,
291 "RX_MODE_API_POLLING": 1,
292 "RX_MODE_API_INTERRUPT": 2,
293 "RX_MODE_API_ADAPTIVE": 3,
294 "RX_MODE_API_DEFAULT": 4,
298 func (x RxMode) String() string {
299 s, ok := RxMode_name[uint32(x)]
303 return "RxMode(" + strconv.Itoa(int(x)) + ")"
306 // SubIfFlags defines enum 'sub_if_flags'.
307 type SubIfFlags uint32
310 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
311 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
312 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
313 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
314 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
315 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
316 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
317 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
318 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
319 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
323 SubIfFlags_name = map[uint32]string{
324 1: "SUB_IF_API_FLAG_NO_TAGS",
325 2: "SUB_IF_API_FLAG_ONE_TAG",
326 4: "SUB_IF_API_FLAG_TWO_TAGS",
327 8: "SUB_IF_API_FLAG_DOT1AD",
328 16: "SUB_IF_API_FLAG_EXACT_MATCH",
329 32: "SUB_IF_API_FLAG_DEFAULT",
330 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
331 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
332 254: "SUB_IF_API_FLAG_MASK_VNET",
333 256: "SUB_IF_API_FLAG_DOT1AH",
335 SubIfFlags_value = map[string]uint32{
336 "SUB_IF_API_FLAG_NO_TAGS": 1,
337 "SUB_IF_API_FLAG_ONE_TAG": 2,
338 "SUB_IF_API_FLAG_TWO_TAGS": 4,
339 "SUB_IF_API_FLAG_DOT1AD": 8,
340 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
341 "SUB_IF_API_FLAG_DEFAULT": 32,
342 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
343 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
344 "SUB_IF_API_FLAG_MASK_VNET": 254,
345 "SUB_IF_API_FLAG_DOT1AH": 256,
349 func (x SubIfFlags) String() string {
350 s, ok := SubIfFlags_name[uint32(x)]
354 str := func(n uint32) string {
355 s, ok := SubIfFlags_name[uint32(n)]
359 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
361 for i := uint32(0); i <= 32; i++ {
371 return str(uint32(x))
376 // InterfaceIndex defines alias 'interface_index'.
377 type InterfaceIndex uint32
379 // ClassifyAddDelSession defines message 'classify_add_del_session'.
380 type ClassifyAddDelSession struct {
381 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
382 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
383 HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=4294967295" json:"hit_next_index,omitempty"`
384 OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
385 Advance int32 `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
386 Action ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
387 Metadata uint32 `binapi:"u32,name=metadata,default=0" json:"metadata,omitempty"`
388 MatchLen uint32 `binapi:"u32,name=match_len" json:"-"`
389 Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"`
392 func (m *ClassifyAddDelSession) Reset() { *m = ClassifyAddDelSession{} }
393 func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" }
394 func (*ClassifyAddDelSession) GetCrcString() string { return "f20879f0" }
395 func (*ClassifyAddDelSession) GetMessageType() api.MessageType {
396 return api.RequestMessage
399 func (m *ClassifyAddDelSession) Size() (size int) {
404 size += 4 // m.TableIndex
405 size += 4 // m.HitNextIndex
406 size += 4 // m.OpaqueIndex
407 size += 4 // m.Advance
408 size += 1 // m.Action
409 size += 4 // m.Metadata
410 size += 4 // m.MatchLen
411 size += 1 * len(m.Match) // m.Match
414 func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
416 b = make([]byte, m.Size())
418 buf := codec.NewBuffer(b)
419 buf.EncodeBool(m.IsAdd)
420 buf.EncodeUint32(m.TableIndex)
421 buf.EncodeUint32(m.HitNextIndex)
422 buf.EncodeUint32(m.OpaqueIndex)
423 buf.EncodeInt32(m.Advance)
424 buf.EncodeUint8(uint8(m.Action))
425 buf.EncodeUint32(m.Metadata)
426 buf.EncodeUint32(uint32(len(m.Match)))
427 buf.EncodeBytes(m.Match, 0)
428 return buf.Bytes(), nil
430 func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
431 buf := codec.NewBuffer(b)
432 m.IsAdd = buf.DecodeBool()
433 m.TableIndex = buf.DecodeUint32()
434 m.HitNextIndex = buf.DecodeUint32()
435 m.OpaqueIndex = buf.DecodeUint32()
436 m.Advance = buf.DecodeInt32()
437 m.Action = ClassifyAction(buf.DecodeUint8())
438 m.Metadata = buf.DecodeUint32()
439 m.MatchLen = buf.DecodeUint32()
440 m.Match = make([]byte, m.MatchLen)
441 copy(m.Match, buf.DecodeBytes(len(m.Match)))
445 // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
446 type ClassifyAddDelSessionReply struct {
447 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
450 func (m *ClassifyAddDelSessionReply) Reset() { *m = ClassifyAddDelSessionReply{} }
451 func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
452 func (*ClassifyAddDelSessionReply) GetCrcString() string { return "e8d4e804" }
453 func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
454 return api.ReplyMessage
457 func (m *ClassifyAddDelSessionReply) Size() (size int) {
461 size += 4 // m.Retval
464 func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
466 b = make([]byte, m.Size())
468 buf := codec.NewBuffer(b)
469 buf.EncodeInt32(m.Retval)
470 return buf.Bytes(), nil
472 func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
473 buf := codec.NewBuffer(b)
474 m.Retval = buf.DecodeInt32()
478 // ClassifyAddDelTable defines message 'classify_add_del_table'.
479 type ClassifyAddDelTable struct {
480 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
481 DelChain bool `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
482 TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
483 Nbuckets uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
484 MemorySize uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
485 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
486 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
487 NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
488 MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
489 CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
490 CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
491 MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
492 Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
495 func (m *ClassifyAddDelTable) Reset() { *m = ClassifyAddDelTable{} }
496 func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
497 func (*ClassifyAddDelTable) GetCrcString() string { return "6849e39e" }
498 func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
499 return api.RequestMessage
502 func (m *ClassifyAddDelTable) Size() (size int) {
507 size += 1 // m.DelChain
508 size += 4 // m.TableIndex
509 size += 4 // m.Nbuckets
510 size += 4 // m.MemorySize
511 size += 4 // m.SkipNVectors
512 size += 4 // m.MatchNVectors
513 size += 4 // m.NextTableIndex
514 size += 4 // m.MissNextIndex
515 size += 1 // m.CurrentDataFlag
516 size += 2 // m.CurrentDataOffset
517 size += 4 // m.MaskLen
518 size += 1 * len(m.Mask) // m.Mask
521 func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
523 b = make([]byte, m.Size())
525 buf := codec.NewBuffer(b)
526 buf.EncodeBool(m.IsAdd)
527 buf.EncodeBool(m.DelChain)
528 buf.EncodeUint32(m.TableIndex)
529 buf.EncodeUint32(m.Nbuckets)
530 buf.EncodeUint32(m.MemorySize)
531 buf.EncodeUint32(m.SkipNVectors)
532 buf.EncodeUint32(m.MatchNVectors)
533 buf.EncodeUint32(m.NextTableIndex)
534 buf.EncodeUint32(m.MissNextIndex)
535 buf.EncodeUint8(m.CurrentDataFlag)
536 buf.EncodeInt16(m.CurrentDataOffset)
537 buf.EncodeUint32(uint32(len(m.Mask)))
538 buf.EncodeBytes(m.Mask, 0)
539 return buf.Bytes(), nil
541 func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
542 buf := codec.NewBuffer(b)
543 m.IsAdd = buf.DecodeBool()
544 m.DelChain = buf.DecodeBool()
545 m.TableIndex = buf.DecodeUint32()
546 m.Nbuckets = buf.DecodeUint32()
547 m.MemorySize = buf.DecodeUint32()
548 m.SkipNVectors = buf.DecodeUint32()
549 m.MatchNVectors = buf.DecodeUint32()
550 m.NextTableIndex = buf.DecodeUint32()
551 m.MissNextIndex = buf.DecodeUint32()
552 m.CurrentDataFlag = buf.DecodeUint8()
553 m.CurrentDataOffset = buf.DecodeInt16()
554 m.MaskLen = buf.DecodeUint32()
555 m.Mask = make([]byte, m.MaskLen)
556 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
560 // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
561 type ClassifyAddDelTableReply struct {
562 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
563 NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
564 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
565 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
568 func (m *ClassifyAddDelTableReply) Reset() { *m = ClassifyAddDelTableReply{} }
569 func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
570 func (*ClassifyAddDelTableReply) GetCrcString() string { return "05486349" }
571 func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
572 return api.ReplyMessage
575 func (m *ClassifyAddDelTableReply) Size() (size int) {
579 size += 4 // m.Retval
580 size += 4 // m.NewTableIndex
581 size += 4 // m.SkipNVectors
582 size += 4 // m.MatchNVectors
585 func (m *ClassifyAddDelTableReply) 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.NewTableIndex)
592 buf.EncodeUint32(m.SkipNVectors)
593 buf.EncodeUint32(m.MatchNVectors)
594 return buf.Bytes(), nil
596 func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
597 buf := codec.NewBuffer(b)
598 m.Retval = buf.DecodeInt32()
599 m.NewTableIndex = buf.DecodeUint32()
600 m.SkipNVectors = buf.DecodeUint32()
601 m.MatchNVectors = buf.DecodeUint32()
605 // ClassifySessionDetails defines message 'classify_session_details'.
606 type ClassifySessionDetails struct {
607 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
608 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
609 HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
610 Advance int32 `binapi:"i32,name=advance" json:"advance,omitempty"`
611 OpaqueIndex uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
612 MatchLength uint32 `binapi:"u32,name=match_length" json:"-"`
613 Match []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
616 func (m *ClassifySessionDetails) Reset() { *m = ClassifySessionDetails{} }
617 func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
618 func (*ClassifySessionDetails) GetCrcString() string { return "60e3ef94" }
619 func (*ClassifySessionDetails) GetMessageType() api.MessageType {
620 return api.ReplyMessage
623 func (m *ClassifySessionDetails) Size() (size int) {
627 size += 4 // m.Retval
628 size += 4 // m.TableID
629 size += 4 // m.HitNextIndex
630 size += 4 // m.Advance
631 size += 4 // m.OpaqueIndex
632 size += 4 // m.MatchLength
633 size += 1 * len(m.Match) // m.Match
636 func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
638 b = make([]byte, m.Size())
640 buf := codec.NewBuffer(b)
641 buf.EncodeInt32(m.Retval)
642 buf.EncodeUint32(m.TableID)
643 buf.EncodeUint32(m.HitNextIndex)
644 buf.EncodeInt32(m.Advance)
645 buf.EncodeUint32(m.OpaqueIndex)
646 buf.EncodeUint32(uint32(len(m.Match)))
647 buf.EncodeBytes(m.Match, 0)
648 return buf.Bytes(), nil
650 func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
651 buf := codec.NewBuffer(b)
652 m.Retval = buf.DecodeInt32()
653 m.TableID = buf.DecodeUint32()
654 m.HitNextIndex = buf.DecodeUint32()
655 m.Advance = buf.DecodeInt32()
656 m.OpaqueIndex = buf.DecodeUint32()
657 m.MatchLength = buf.DecodeUint32()
658 m.Match = make([]byte, m.MatchLength)
659 copy(m.Match, buf.DecodeBytes(len(m.Match)))
663 // ClassifySessionDump defines message 'classify_session_dump'.
664 type ClassifySessionDump struct {
665 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
668 func (m *ClassifySessionDump) Reset() { *m = ClassifySessionDump{} }
669 func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
670 func (*ClassifySessionDump) GetCrcString() string { return "0cca2cd9" }
671 func (*ClassifySessionDump) GetMessageType() api.MessageType {
672 return api.RequestMessage
675 func (m *ClassifySessionDump) Size() (size int) {
679 size += 4 // m.TableID
682 func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
684 b = make([]byte, m.Size())
686 buf := codec.NewBuffer(b)
687 buf.EncodeUint32(m.TableID)
688 return buf.Bytes(), nil
690 func (m *ClassifySessionDump) Unmarshal(b []byte) error {
691 buf := codec.NewBuffer(b)
692 m.TableID = buf.DecodeUint32()
696 // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
697 type ClassifySetInterfaceIPTable struct {
698 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
699 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
700 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
703 func (m *ClassifySetInterfaceIPTable) Reset() { *m = ClassifySetInterfaceIPTable{} }
704 func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
705 func (*ClassifySetInterfaceIPTable) GetCrcString() string { return "e0b097c7" }
706 func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
707 return api.RequestMessage
710 func (m *ClassifySetInterfaceIPTable) Size() (size int) {
714 size += 1 // m.IsIPv6
715 size += 4 // m.SwIfIndex
716 size += 4 // m.TableIndex
719 func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
721 b = make([]byte, m.Size())
723 buf := codec.NewBuffer(b)
724 buf.EncodeBool(m.IsIPv6)
725 buf.EncodeUint32(uint32(m.SwIfIndex))
726 buf.EncodeUint32(m.TableIndex)
727 return buf.Bytes(), nil
729 func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
730 buf := codec.NewBuffer(b)
731 m.IsIPv6 = buf.DecodeBool()
732 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
733 m.TableIndex = buf.DecodeUint32()
737 // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
738 type ClassifySetInterfaceIPTableReply struct {
739 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
742 func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
743 func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
744 return "classify_set_interface_ip_table_reply"
746 func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
747 func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
748 return api.ReplyMessage
751 func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
755 size += 4 // m.Retval
758 func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
760 b = make([]byte, m.Size())
762 buf := codec.NewBuffer(b)
763 buf.EncodeInt32(m.Retval)
764 return buf.Bytes(), nil
766 func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
767 buf := codec.NewBuffer(b)
768 m.Retval = buf.DecodeInt32()
772 // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
773 type ClassifySetInterfaceL2Tables struct {
774 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
775 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
776 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
777 OtherTableIndex uint32 `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
778 IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"`
781 func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
782 func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
783 return "classify_set_interface_l2_tables"
785 func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
786 func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
787 return api.RequestMessage
790 func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
794 size += 4 // m.SwIfIndex
795 size += 4 // m.IP4TableIndex
796 size += 4 // m.IP6TableIndex
797 size += 4 // m.OtherTableIndex
798 size += 1 // m.IsInput
801 func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
803 b = make([]byte, m.Size())
805 buf := codec.NewBuffer(b)
806 buf.EncodeUint32(uint32(m.SwIfIndex))
807 buf.EncodeUint32(m.IP4TableIndex)
808 buf.EncodeUint32(m.IP6TableIndex)
809 buf.EncodeUint32(m.OtherTableIndex)
810 buf.EncodeBool(m.IsInput)
811 return buf.Bytes(), nil
813 func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
814 buf := codec.NewBuffer(b)
815 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
816 m.IP4TableIndex = buf.DecodeUint32()
817 m.IP6TableIndex = buf.DecodeUint32()
818 m.OtherTableIndex = buf.DecodeUint32()
819 m.IsInput = buf.DecodeBool()
823 // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
824 type ClassifySetInterfaceL2TablesReply struct {
825 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
828 func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
829 func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
830 return "classify_set_interface_l2_tables_reply"
832 func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
833 func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
834 return api.ReplyMessage
837 func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
841 size += 4 // m.Retval
844 func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
846 b = make([]byte, m.Size())
848 buf := codec.NewBuffer(b)
849 buf.EncodeInt32(m.Retval)
850 return buf.Bytes(), nil
852 func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
853 buf := codec.NewBuffer(b)
854 m.Retval = buf.DecodeInt32()
858 // ClassifyTableByInterface defines message 'classify_table_by_interface'.
859 type ClassifyTableByInterface struct {
860 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
863 func (m *ClassifyTableByInterface) Reset() { *m = ClassifyTableByInterface{} }
864 func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
865 func (*ClassifyTableByInterface) GetCrcString() string { return "f9e6675e" }
866 func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
867 return api.RequestMessage
870 func (m *ClassifyTableByInterface) Size() (size int) {
874 size += 4 // m.SwIfIndex
877 func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
879 b = make([]byte, m.Size())
881 buf := codec.NewBuffer(b)
882 buf.EncodeUint32(uint32(m.SwIfIndex))
883 return buf.Bytes(), nil
885 func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
886 buf := codec.NewBuffer(b)
887 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
891 // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
892 type ClassifyTableByInterfaceReply struct {
893 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
894 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
895 L2TableID uint32 `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
896 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
897 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
900 func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
901 func (*ClassifyTableByInterfaceReply) GetMessageName() string {
902 return "classify_table_by_interface_reply"
904 func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
905 func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
906 return api.ReplyMessage
909 func (m *ClassifyTableByInterfaceReply) Size() (size int) {
913 size += 4 // m.Retval
914 size += 4 // m.SwIfIndex
915 size += 4 // m.L2TableID
916 size += 4 // m.IP4TableID
917 size += 4 // m.IP6TableID
920 func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
922 b = make([]byte, m.Size())
924 buf := codec.NewBuffer(b)
925 buf.EncodeInt32(m.Retval)
926 buf.EncodeUint32(uint32(m.SwIfIndex))
927 buf.EncodeUint32(m.L2TableID)
928 buf.EncodeUint32(m.IP4TableID)
929 buf.EncodeUint32(m.IP6TableID)
930 return buf.Bytes(), nil
932 func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
933 buf := codec.NewBuffer(b)
934 m.Retval = buf.DecodeInt32()
935 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
936 m.L2TableID = buf.DecodeUint32()
937 m.IP4TableID = buf.DecodeUint32()
938 m.IP6TableID = buf.DecodeUint32()
942 // ClassifyTableIds defines message 'classify_table_ids'.
943 type ClassifyTableIds struct{}
945 func (m *ClassifyTableIds) Reset() { *m = ClassifyTableIds{} }
946 func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
947 func (*ClassifyTableIds) GetCrcString() string { return "51077d14" }
948 func (*ClassifyTableIds) GetMessageType() api.MessageType {
949 return api.RequestMessage
952 func (m *ClassifyTableIds) Size() (size int) {
958 func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
960 b = make([]byte, m.Size())
962 buf := codec.NewBuffer(b)
963 return buf.Bytes(), nil
965 func (m *ClassifyTableIds) Unmarshal(b []byte) error {
969 // ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
970 type ClassifyTableIdsReply struct {
971 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
972 Count uint32 `binapi:"u32,name=count" json:"-"`
973 Ids []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
976 func (m *ClassifyTableIdsReply) Reset() { *m = ClassifyTableIdsReply{} }
977 func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
978 func (*ClassifyTableIdsReply) GetCrcString() string { return "d1d20e1d" }
979 func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
980 return api.ReplyMessage
983 func (m *ClassifyTableIdsReply) Size() (size int) {
987 size += 4 // m.Retval
989 size += 4 * len(m.Ids) // m.Ids
992 func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
994 b = make([]byte, m.Size())
996 buf := codec.NewBuffer(b)
997 buf.EncodeInt32(m.Retval)
998 buf.EncodeUint32(uint32(len(m.Ids)))
999 for i := 0; i < len(m.Ids); i++ {
1002 x = uint32(m.Ids[i])
1006 return buf.Bytes(), nil
1008 func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
1009 buf := codec.NewBuffer(b)
1010 m.Retval = buf.DecodeInt32()
1011 m.Count = buf.DecodeUint32()
1012 m.Ids = make([]uint32, m.Count)
1013 for i := 0; i < len(m.Ids); i++ {
1014 m.Ids[i] = buf.DecodeUint32()
1019 // ClassifyTableInfo defines message 'classify_table_info'.
1020 type ClassifyTableInfo struct {
1021 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1024 func (m *ClassifyTableInfo) Reset() { *m = ClassifyTableInfo{} }
1025 func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
1026 func (*ClassifyTableInfo) GetCrcString() string { return "0cca2cd9" }
1027 func (*ClassifyTableInfo) GetMessageType() api.MessageType {
1028 return api.RequestMessage
1031 func (m *ClassifyTableInfo) Size() (size int) {
1035 size += 4 // m.TableID
1038 func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
1040 b = make([]byte, m.Size())
1042 buf := codec.NewBuffer(b)
1043 buf.EncodeUint32(m.TableID)
1044 return buf.Bytes(), nil
1046 func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
1047 buf := codec.NewBuffer(b)
1048 m.TableID = buf.DecodeUint32()
1052 // ClassifyTableInfoReply defines message 'classify_table_info_reply'.
1053 type ClassifyTableInfoReply struct {
1054 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1055 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1056 Nbuckets uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
1057 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
1058 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
1059 ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
1060 NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
1061 MissNextIndex uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
1062 MaskLength uint32 `binapi:"u32,name=mask_length" json:"-"`
1063 Mask []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
1066 func (m *ClassifyTableInfoReply) Reset() { *m = ClassifyTableInfoReply{} }
1067 func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
1068 func (*ClassifyTableInfoReply) GetCrcString() string { return "4a573c0e" }
1069 func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
1070 return api.ReplyMessage
1073 func (m *ClassifyTableInfoReply) Size() (size int) {
1077 size += 4 // m.Retval
1078 size += 4 // m.TableID
1079 size += 4 // m.Nbuckets
1080 size += 4 // m.MatchNVectors
1081 size += 4 // m.SkipNVectors
1082 size += 4 // m.ActiveSessions
1083 size += 4 // m.NextTableIndex
1084 size += 4 // m.MissNextIndex
1085 size += 4 // m.MaskLength
1086 size += 1 * len(m.Mask) // m.Mask
1089 func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
1091 b = make([]byte, m.Size())
1093 buf := codec.NewBuffer(b)
1094 buf.EncodeInt32(m.Retval)
1095 buf.EncodeUint32(m.TableID)
1096 buf.EncodeUint32(m.Nbuckets)
1097 buf.EncodeUint32(m.MatchNVectors)
1098 buf.EncodeUint32(m.SkipNVectors)
1099 buf.EncodeUint32(m.ActiveSessions)
1100 buf.EncodeUint32(m.NextTableIndex)
1101 buf.EncodeUint32(m.MissNextIndex)
1102 buf.EncodeUint32(uint32(len(m.Mask)))
1103 buf.EncodeBytes(m.Mask, 0)
1104 return buf.Bytes(), nil
1106 func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
1107 buf := codec.NewBuffer(b)
1108 m.Retval = buf.DecodeInt32()
1109 m.TableID = buf.DecodeUint32()
1110 m.Nbuckets = buf.DecodeUint32()
1111 m.MatchNVectors = buf.DecodeUint32()
1112 m.SkipNVectors = buf.DecodeUint32()
1113 m.ActiveSessions = buf.DecodeUint32()
1114 m.NextTableIndex = buf.DecodeUint32()
1115 m.MissNextIndex = buf.DecodeUint32()
1116 m.MaskLength = buf.DecodeUint32()
1117 m.Mask = make([]byte, m.MaskLength)
1118 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
1122 // FlowClassifyDetails defines message 'flow_classify_details'.
1123 type FlowClassifyDetails struct {
1124 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1125 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1128 func (m *FlowClassifyDetails) Reset() { *m = FlowClassifyDetails{} }
1129 func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
1130 func (*FlowClassifyDetails) GetCrcString() string { return "dfd08765" }
1131 func (*FlowClassifyDetails) GetMessageType() api.MessageType {
1132 return api.ReplyMessage
1135 func (m *FlowClassifyDetails) Size() (size int) {
1139 size += 4 // m.SwIfIndex
1140 size += 4 // m.TableIndex
1143 func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
1145 b = make([]byte, m.Size())
1147 buf := codec.NewBuffer(b)
1148 buf.EncodeUint32(uint32(m.SwIfIndex))
1149 buf.EncodeUint32(m.TableIndex)
1150 return buf.Bytes(), nil
1152 func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
1153 buf := codec.NewBuffer(b)
1154 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1155 m.TableIndex = buf.DecodeUint32()
1159 // FlowClassifyDump defines message 'flow_classify_dump'.
1160 type FlowClassifyDump struct {
1161 Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
1162 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1165 func (m *FlowClassifyDump) Reset() { *m = FlowClassifyDump{} }
1166 func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
1167 func (*FlowClassifyDump) GetCrcString() string { return "8a6ad43d" }
1168 func (*FlowClassifyDump) GetMessageType() api.MessageType {
1169 return api.RequestMessage
1172 func (m *FlowClassifyDump) Size() (size int) {
1177 size += 4 // m.SwIfIndex
1180 func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
1182 b = make([]byte, m.Size())
1184 buf := codec.NewBuffer(b)
1185 buf.EncodeUint8(uint8(m.Type))
1186 buf.EncodeUint32(uint32(m.SwIfIndex))
1187 return buf.Bytes(), nil
1189 func (m *FlowClassifyDump) Unmarshal(b []byte) error {
1190 buf := codec.NewBuffer(b)
1191 m.Type = FlowClassifyTable(buf.DecodeUint8())
1192 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1196 // FlowClassifySetInterface defines message 'flow_classify_set_interface'.
1197 type FlowClassifySetInterface struct {
1198 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1199 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1200 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1201 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1204 func (m *FlowClassifySetInterface) Reset() { *m = FlowClassifySetInterface{} }
1205 func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
1206 func (*FlowClassifySetInterface) GetCrcString() string { return "b6192f1c" }
1207 func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
1208 return api.RequestMessage
1211 func (m *FlowClassifySetInterface) Size() (size int) {
1215 size += 4 // m.SwIfIndex
1216 size += 4 // m.IP4TableIndex
1217 size += 4 // m.IP6TableIndex
1218 size += 1 // m.IsAdd
1221 func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1223 b = make([]byte, m.Size())
1225 buf := codec.NewBuffer(b)
1226 buf.EncodeUint32(uint32(m.SwIfIndex))
1227 buf.EncodeUint32(m.IP4TableIndex)
1228 buf.EncodeUint32(m.IP6TableIndex)
1229 buf.EncodeBool(m.IsAdd)
1230 return buf.Bytes(), nil
1232 func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
1233 buf := codec.NewBuffer(b)
1234 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1235 m.IP4TableIndex = buf.DecodeUint32()
1236 m.IP6TableIndex = buf.DecodeUint32()
1237 m.IsAdd = buf.DecodeBool()
1241 // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
1242 type FlowClassifySetInterfaceReply struct {
1243 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1246 func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
1247 func (*FlowClassifySetInterfaceReply) GetMessageName() string {
1248 return "flow_classify_set_interface_reply"
1250 func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1251 func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
1252 return api.ReplyMessage
1255 func (m *FlowClassifySetInterfaceReply) Size() (size int) {
1259 size += 4 // m.Retval
1262 func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1264 b = make([]byte, m.Size())
1266 buf := codec.NewBuffer(b)
1267 buf.EncodeInt32(m.Retval)
1268 return buf.Bytes(), nil
1270 func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
1271 buf := codec.NewBuffer(b)
1272 m.Retval = buf.DecodeInt32()
1276 // InputACLSetInterface defines message 'input_acl_set_interface'.
1277 type InputACLSetInterface struct {
1278 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1279 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1280 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1281 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1282 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1285 func (m *InputACLSetInterface) Reset() { *m = InputACLSetInterface{} }
1286 func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
1287 func (*InputACLSetInterface) GetCrcString() string { return "de7ad708" }
1288 func (*InputACLSetInterface) GetMessageType() api.MessageType {
1289 return api.RequestMessage
1292 func (m *InputACLSetInterface) Size() (size int) {
1296 size += 4 // m.SwIfIndex
1297 size += 4 // m.IP4TableIndex
1298 size += 4 // m.IP6TableIndex
1299 size += 4 // m.L2TableIndex
1300 size += 1 // m.IsAdd
1303 func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1305 b = make([]byte, m.Size())
1307 buf := codec.NewBuffer(b)
1308 buf.EncodeUint32(uint32(m.SwIfIndex))
1309 buf.EncodeUint32(m.IP4TableIndex)
1310 buf.EncodeUint32(m.IP6TableIndex)
1311 buf.EncodeUint32(m.L2TableIndex)
1312 buf.EncodeBool(m.IsAdd)
1313 return buf.Bytes(), nil
1315 func (m *InputACLSetInterface) Unmarshal(b []byte) error {
1316 buf := codec.NewBuffer(b)
1317 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1318 m.IP4TableIndex = buf.DecodeUint32()
1319 m.IP6TableIndex = buf.DecodeUint32()
1320 m.L2TableIndex = buf.DecodeUint32()
1321 m.IsAdd = buf.DecodeBool()
1325 // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
1326 type InputACLSetInterfaceReply struct {
1327 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1330 func (m *InputACLSetInterfaceReply) Reset() { *m = InputACLSetInterfaceReply{} }
1331 func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
1332 func (*InputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1333 func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
1334 return api.ReplyMessage
1337 func (m *InputACLSetInterfaceReply) Size() (size int) {
1341 size += 4 // m.Retval
1344 func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1346 b = make([]byte, m.Size())
1348 buf := codec.NewBuffer(b)
1349 buf.EncodeInt32(m.Retval)
1350 return buf.Bytes(), nil
1352 func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
1353 buf := codec.NewBuffer(b)
1354 m.Retval = buf.DecodeInt32()
1358 // OutputACLSetInterface defines message 'output_acl_set_interface'.
1359 type OutputACLSetInterface struct {
1360 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1361 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1362 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1363 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1364 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1367 func (m *OutputACLSetInterface) Reset() { *m = OutputACLSetInterface{} }
1368 func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
1369 func (*OutputACLSetInterface) GetCrcString() string { return "de7ad708" }
1370 func (*OutputACLSetInterface) GetMessageType() api.MessageType {
1371 return api.RequestMessage
1374 func (m *OutputACLSetInterface) Size() (size int) {
1378 size += 4 // m.SwIfIndex
1379 size += 4 // m.IP4TableIndex
1380 size += 4 // m.IP6TableIndex
1381 size += 4 // m.L2TableIndex
1382 size += 1 // m.IsAdd
1385 func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1387 b = make([]byte, m.Size())
1389 buf := codec.NewBuffer(b)
1390 buf.EncodeUint32(uint32(m.SwIfIndex))
1391 buf.EncodeUint32(m.IP4TableIndex)
1392 buf.EncodeUint32(m.IP6TableIndex)
1393 buf.EncodeUint32(m.L2TableIndex)
1394 buf.EncodeBool(m.IsAdd)
1395 return buf.Bytes(), nil
1397 func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
1398 buf := codec.NewBuffer(b)
1399 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1400 m.IP4TableIndex = buf.DecodeUint32()
1401 m.IP6TableIndex = buf.DecodeUint32()
1402 m.L2TableIndex = buf.DecodeUint32()
1403 m.IsAdd = buf.DecodeBool()
1407 // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
1408 type OutputACLSetInterfaceReply struct {
1409 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1412 func (m *OutputACLSetInterfaceReply) Reset() { *m = OutputACLSetInterfaceReply{} }
1413 func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
1414 func (*OutputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1415 func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
1416 return api.ReplyMessage
1419 func (m *OutputACLSetInterfaceReply) Size() (size int) {
1423 size += 4 // m.Retval
1426 func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1428 b = make([]byte, m.Size())
1430 buf := codec.NewBuffer(b)
1431 buf.EncodeInt32(m.Retval)
1432 return buf.Bytes(), nil
1434 func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
1435 buf := codec.NewBuffer(b)
1436 m.Retval = buf.DecodeInt32()
1440 // PolicerClassifyDetails defines message 'policer_classify_details'.
1441 type PolicerClassifyDetails struct {
1442 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1443 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1446 func (m *PolicerClassifyDetails) Reset() { *m = PolicerClassifyDetails{} }
1447 func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
1448 func (*PolicerClassifyDetails) GetCrcString() string { return "dfd08765" }
1449 func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
1450 return api.ReplyMessage
1453 func (m *PolicerClassifyDetails) Size() (size int) {
1457 size += 4 // m.SwIfIndex
1458 size += 4 // m.TableIndex
1461 func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
1463 b = make([]byte, m.Size())
1465 buf := codec.NewBuffer(b)
1466 buf.EncodeUint32(uint32(m.SwIfIndex))
1467 buf.EncodeUint32(m.TableIndex)
1468 return buf.Bytes(), nil
1470 func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
1471 buf := codec.NewBuffer(b)
1472 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1473 m.TableIndex = buf.DecodeUint32()
1477 // PolicerClassifyDump defines message 'policer_classify_dump'.
1478 type PolicerClassifyDump struct {
1479 Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
1480 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1483 func (m *PolicerClassifyDump) Reset() { *m = PolicerClassifyDump{} }
1484 func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
1485 func (*PolicerClassifyDump) GetCrcString() string { return "6bfe6603" }
1486 func (*PolicerClassifyDump) GetMessageType() api.MessageType {
1487 return api.RequestMessage
1490 func (m *PolicerClassifyDump) Size() (size int) {
1495 size += 4 // m.SwIfIndex
1498 func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
1500 b = make([]byte, m.Size())
1502 buf := codec.NewBuffer(b)
1503 buf.EncodeUint8(uint8(m.Type))
1504 buf.EncodeUint32(uint32(m.SwIfIndex))
1505 return buf.Bytes(), nil
1507 func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
1508 buf := codec.NewBuffer(b)
1509 m.Type = PolicerClassifyTable(buf.DecodeUint8())
1510 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1514 // PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
1515 type PolicerClassifySetInterface struct {
1516 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1517 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1518 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1519 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1520 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1523 func (m *PolicerClassifySetInterface) Reset() { *m = PolicerClassifySetInterface{} }
1524 func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
1525 func (*PolicerClassifySetInterface) GetCrcString() string { return "de7ad708" }
1526 func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
1527 return api.RequestMessage
1530 func (m *PolicerClassifySetInterface) Size() (size int) {
1534 size += 4 // m.SwIfIndex
1535 size += 4 // m.IP4TableIndex
1536 size += 4 // m.IP6TableIndex
1537 size += 4 // m.L2TableIndex
1538 size += 1 // m.IsAdd
1541 func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1543 b = make([]byte, m.Size())
1545 buf := codec.NewBuffer(b)
1546 buf.EncodeUint32(uint32(m.SwIfIndex))
1547 buf.EncodeUint32(m.IP4TableIndex)
1548 buf.EncodeUint32(m.IP6TableIndex)
1549 buf.EncodeUint32(m.L2TableIndex)
1550 buf.EncodeBool(m.IsAdd)
1551 return buf.Bytes(), nil
1553 func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
1554 buf := codec.NewBuffer(b)
1555 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1556 m.IP4TableIndex = buf.DecodeUint32()
1557 m.IP6TableIndex = buf.DecodeUint32()
1558 m.L2TableIndex = buf.DecodeUint32()
1559 m.IsAdd = buf.DecodeBool()
1563 // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
1564 type PolicerClassifySetInterfaceReply struct {
1565 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1568 func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
1569 func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
1570 return "policer_classify_set_interface_reply"
1572 func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1573 func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
1574 return api.ReplyMessage
1577 func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
1581 size += 4 // m.Retval
1584 func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1586 b = make([]byte, m.Size())
1588 buf := codec.NewBuffer(b)
1589 buf.EncodeInt32(m.Retval)
1590 return buf.Bytes(), nil
1592 func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
1593 buf := codec.NewBuffer(b)
1594 m.Retval = buf.DecodeInt32()
1598 func init() { file_classify_binapi_init() }
1599 func file_classify_binapi_init() {
1600 api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
1601 api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
1602 api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
1603 api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
1604 api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
1605 api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
1606 api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
1607 api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
1608 api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
1609 api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
1610 api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
1611 api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
1612 api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
1613 api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
1614 api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
1615 api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
1616 api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
1617 api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
1618 api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
1619 api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
1620 api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
1621 api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
1622 api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
1623 api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
1624 api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
1625 api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
1626 api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
1627 api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
1630 // Messages returns list of all messages in this module.
1631 func AllMessages() []api.Message {
1632 return []api.Message{
1633 (*ClassifyAddDelSession)(nil),
1634 (*ClassifyAddDelSessionReply)(nil),
1635 (*ClassifyAddDelTable)(nil),
1636 (*ClassifyAddDelTableReply)(nil),
1637 (*ClassifySessionDetails)(nil),
1638 (*ClassifySessionDump)(nil),
1639 (*ClassifySetInterfaceIPTable)(nil),
1640 (*ClassifySetInterfaceIPTableReply)(nil),
1641 (*ClassifySetInterfaceL2Tables)(nil),
1642 (*ClassifySetInterfaceL2TablesReply)(nil),
1643 (*ClassifyTableByInterface)(nil),
1644 (*ClassifyTableByInterfaceReply)(nil),
1645 (*ClassifyTableIds)(nil),
1646 (*ClassifyTableIdsReply)(nil),
1647 (*ClassifyTableInfo)(nil),
1648 (*ClassifyTableInfoReply)(nil),
1649 (*FlowClassifyDetails)(nil),
1650 (*FlowClassifyDump)(nil),
1651 (*FlowClassifySetInterface)(nil),
1652 (*FlowClassifySetInterfaceReply)(nil),
1653 (*InputACLSetInterface)(nil),
1654 (*InputACLSetInterfaceReply)(nil),
1655 (*OutputACLSetInterface)(nil),
1656 (*OutputACLSetInterfaceReply)(nil),
1657 (*PolicerClassifyDetails)(nil),
1658 (*PolicerClassifyDump)(nil),
1659 (*PolicerClassifySetInterface)(nil),
1660 (*PolicerClassifySetInterfaceReply)(nil),