1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/core/classify.api.json
7 // Package classify contains generated bindings for API file classify.api.
17 api "git.fd.io/govpp.git/api"
18 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0x13587952
34 // ClassifyAction defines enum 'classify_action'.
35 type ClassifyAction uint8
38 CLASSIFY_API_ACTION_NONE ClassifyAction = 0
39 CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX ClassifyAction = 1
40 CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX ClassifyAction = 2
41 CLASSIFY_API_ACTION_SET_METADATA ClassifyAction = 3
45 ClassifyAction_name = map[uint8]string{
46 0: "CLASSIFY_API_ACTION_NONE",
47 1: "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX",
48 2: "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX",
49 3: "CLASSIFY_API_ACTION_SET_METADATA",
51 ClassifyAction_value = map[string]uint8{
52 "CLASSIFY_API_ACTION_NONE": 0,
53 "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX": 1,
54 "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX": 2,
55 "CLASSIFY_API_ACTION_SET_METADATA": 3,
59 func (x ClassifyAction) String() string {
60 s, ok := ClassifyAction_name[uint8(x)]
64 return "ClassifyAction(" + strconv.Itoa(int(x)) + ")"
67 // FlowClassifyTable defines enum 'flow_classify_table'.
68 type FlowClassifyTable uint8
71 FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 1
72 FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 2
76 FlowClassifyTable_name = map[uint8]string{
77 1: "FLOW_CLASSIFY_API_TABLE_IP4",
78 2: "FLOW_CLASSIFY_API_TABLE_IP6",
80 FlowClassifyTable_value = map[string]uint8{
81 "FLOW_CLASSIFY_API_TABLE_IP4": 1,
82 "FLOW_CLASSIFY_API_TABLE_IP6": 2,
86 func (x FlowClassifyTable) String() string {
87 s, ok := FlowClassifyTable_name[uint8(x)]
91 return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")"
94 // IfStatusFlags defines enum 'if_status_flags'.
95 type IfStatusFlags uint32
98 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
99 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
103 IfStatusFlags_name = map[uint32]string{
104 1: "IF_STATUS_API_FLAG_ADMIN_UP",
105 2: "IF_STATUS_API_FLAG_LINK_UP",
107 IfStatusFlags_value = map[string]uint32{
108 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
109 "IF_STATUS_API_FLAG_LINK_UP": 2,
113 func (x IfStatusFlags) String() string {
114 s, ok := IfStatusFlags_name[uint32(x)]
118 str := func(n uint32) string {
119 s, ok := IfStatusFlags_name[uint32(n)]
123 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
125 for i := uint32(0); i <= 32; i++ {
135 return str(uint32(x))
140 // IfType defines enum 'if_type'.
144 IF_API_TYPE_HARDWARE IfType = 1
145 IF_API_TYPE_SUB IfType = 2
146 IF_API_TYPE_P2P IfType = 3
147 IF_API_TYPE_PIPE IfType = 4
151 IfType_name = map[uint32]string{
152 1: "IF_API_TYPE_HARDWARE",
153 2: "IF_API_TYPE_SUB",
154 3: "IF_API_TYPE_P2P",
155 4: "IF_API_TYPE_PIPE",
157 IfType_value = map[string]uint32{
158 "IF_API_TYPE_HARDWARE": 1,
159 "IF_API_TYPE_SUB": 2,
160 "IF_API_TYPE_P2P": 3,
161 "IF_API_TYPE_PIPE": 4,
165 func (x IfType) String() string {
166 s, ok := IfType_name[uint32(x)]
170 return "IfType(" + strconv.Itoa(int(x)) + ")"
173 // LinkDuplex defines enum 'link_duplex'.
174 type LinkDuplex uint32
177 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
178 LINK_DUPLEX_API_HALF LinkDuplex = 1
179 LINK_DUPLEX_API_FULL LinkDuplex = 2
183 LinkDuplex_name = map[uint32]string{
184 0: "LINK_DUPLEX_API_UNKNOWN",
185 1: "LINK_DUPLEX_API_HALF",
186 2: "LINK_DUPLEX_API_FULL",
188 LinkDuplex_value = map[string]uint32{
189 "LINK_DUPLEX_API_UNKNOWN": 0,
190 "LINK_DUPLEX_API_HALF": 1,
191 "LINK_DUPLEX_API_FULL": 2,
195 func (x LinkDuplex) String() string {
196 s, ok := LinkDuplex_name[uint32(x)]
200 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
203 // MtuProto defines enum 'mtu_proto'.
207 MTU_PROTO_API_L3 MtuProto = 1
208 MTU_PROTO_API_IP4 MtuProto = 2
209 MTU_PROTO_API_IP6 MtuProto = 3
210 MTU_PROTO_API_MPLS MtuProto = 4
211 MTU_PROTO_API_N MtuProto = 5
215 MtuProto_name = map[uint32]string{
216 1: "MTU_PROTO_API_L3",
217 2: "MTU_PROTO_API_IP4",
218 3: "MTU_PROTO_API_IP6",
219 4: "MTU_PROTO_API_MPLS",
220 5: "MTU_PROTO_API_N",
222 MtuProto_value = map[string]uint32{
223 "MTU_PROTO_API_L3": 1,
224 "MTU_PROTO_API_IP4": 2,
225 "MTU_PROTO_API_IP6": 3,
226 "MTU_PROTO_API_MPLS": 4,
227 "MTU_PROTO_API_N": 5,
231 func (x MtuProto) String() string {
232 s, ok := MtuProto_name[uint32(x)]
236 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
239 // PolicerClassifyTable defines enum 'policer_classify_table'.
240 type PolicerClassifyTable uint8
243 POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1
244 POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2
245 POLICER_CLASSIFY_API_TABLE_L2 PolicerClassifyTable = 3
249 PolicerClassifyTable_name = map[uint8]string{
250 1: "POLICER_CLASSIFY_API_TABLE_IP4",
251 2: "POLICER_CLASSIFY_API_TABLE_IP6",
252 3: "POLICER_CLASSIFY_API_TABLE_L2",
254 PolicerClassifyTable_value = map[string]uint8{
255 "POLICER_CLASSIFY_API_TABLE_IP4": 1,
256 "POLICER_CLASSIFY_API_TABLE_IP6": 2,
257 "POLICER_CLASSIFY_API_TABLE_L2": 3,
261 func (x PolicerClassifyTable) String() string {
262 s, ok := PolicerClassifyTable_name[uint8(x)]
266 return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
269 // RxMode defines enum 'rx_mode'.
273 RX_MODE_API_UNKNOWN RxMode = 0
274 RX_MODE_API_POLLING RxMode = 1
275 RX_MODE_API_INTERRUPT RxMode = 2
276 RX_MODE_API_ADAPTIVE RxMode = 3
277 RX_MODE_API_DEFAULT RxMode = 4
281 RxMode_name = map[uint32]string{
282 0: "RX_MODE_API_UNKNOWN",
283 1: "RX_MODE_API_POLLING",
284 2: "RX_MODE_API_INTERRUPT",
285 3: "RX_MODE_API_ADAPTIVE",
286 4: "RX_MODE_API_DEFAULT",
288 RxMode_value = map[string]uint32{
289 "RX_MODE_API_UNKNOWN": 0,
290 "RX_MODE_API_POLLING": 1,
291 "RX_MODE_API_INTERRUPT": 2,
292 "RX_MODE_API_ADAPTIVE": 3,
293 "RX_MODE_API_DEFAULT": 4,
297 func (x RxMode) String() string {
298 s, ok := RxMode_name[uint32(x)]
302 return "RxMode(" + strconv.Itoa(int(x)) + ")"
305 // SubIfFlags defines enum 'sub_if_flags'.
306 type SubIfFlags uint32
309 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
310 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
311 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
312 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
313 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
314 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
315 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
316 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
317 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
318 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
322 SubIfFlags_name = map[uint32]string{
323 1: "SUB_IF_API_FLAG_NO_TAGS",
324 2: "SUB_IF_API_FLAG_ONE_TAG",
325 4: "SUB_IF_API_FLAG_TWO_TAGS",
326 8: "SUB_IF_API_FLAG_DOT1AD",
327 16: "SUB_IF_API_FLAG_EXACT_MATCH",
328 32: "SUB_IF_API_FLAG_DEFAULT",
329 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
330 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
331 254: "SUB_IF_API_FLAG_MASK_VNET",
332 256: "SUB_IF_API_FLAG_DOT1AH",
334 SubIfFlags_value = map[string]uint32{
335 "SUB_IF_API_FLAG_NO_TAGS": 1,
336 "SUB_IF_API_FLAG_ONE_TAG": 2,
337 "SUB_IF_API_FLAG_TWO_TAGS": 4,
338 "SUB_IF_API_FLAG_DOT1AD": 8,
339 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
340 "SUB_IF_API_FLAG_DEFAULT": 32,
341 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
342 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
343 "SUB_IF_API_FLAG_MASK_VNET": 254,
344 "SUB_IF_API_FLAG_DOT1AH": 256,
348 func (x SubIfFlags) String() string {
349 s, ok := SubIfFlags_name[uint32(x)]
353 str := func(n uint32) string {
354 s, ok := SubIfFlags_name[uint32(n)]
358 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
360 for i := uint32(0); i <= 32; i++ {
370 return str(uint32(x))
375 // InterfaceIndex defines alias 'interface_index'.
376 type InterfaceIndex uint32
378 // ClassifyAddDelSession defines message 'classify_add_del_session'.
379 type ClassifyAddDelSession struct {
380 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
381 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
382 HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=4294967295" json:"hit_next_index,omitempty"`
383 OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
384 Advance int32 `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
385 Action ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
386 Metadata uint32 `binapi:"u32,name=metadata,default=0" json:"metadata,omitempty"`
387 MatchLen uint32 `binapi:"u32,name=match_len" json:"-"`
388 Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"`
391 func (m *ClassifyAddDelSession) Reset() { *m = ClassifyAddDelSession{} }
392 func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" }
393 func (*ClassifyAddDelSession) GetCrcString() string { return "f20879f0" }
394 func (*ClassifyAddDelSession) GetMessageType() api.MessageType {
395 return api.RequestMessage
398 func (m *ClassifyAddDelSession) Size() (size int) {
403 size += 4 // m.TableIndex
404 size += 4 // m.HitNextIndex
405 size += 4 // m.OpaqueIndex
406 size += 4 // m.Advance
407 size += 1 // m.Action
408 size += 4 // m.Metadata
409 size += 4 // m.MatchLen
410 size += 1 * len(m.Match) // m.Match
413 func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
415 b = make([]byte, m.Size())
417 buf := codec.NewBuffer(b)
418 buf.EncodeBool(m.IsAdd)
419 buf.EncodeUint32(m.TableIndex)
420 buf.EncodeUint32(m.HitNextIndex)
421 buf.EncodeUint32(m.OpaqueIndex)
422 buf.EncodeInt32(m.Advance)
423 buf.EncodeUint8(uint8(m.Action))
424 buf.EncodeUint32(m.Metadata)
425 buf.EncodeUint32(uint32(len(m.Match)))
426 buf.EncodeBytes(m.Match, 0)
427 return buf.Bytes(), nil
429 func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
430 buf := codec.NewBuffer(b)
431 m.IsAdd = buf.DecodeBool()
432 m.TableIndex = buf.DecodeUint32()
433 m.HitNextIndex = buf.DecodeUint32()
434 m.OpaqueIndex = buf.DecodeUint32()
435 m.Advance = buf.DecodeInt32()
436 m.Action = ClassifyAction(buf.DecodeUint8())
437 m.Metadata = buf.DecodeUint32()
438 m.MatchLen = buf.DecodeUint32()
439 m.Match = make([]byte, m.MatchLen)
440 copy(m.Match, buf.DecodeBytes(len(m.Match)))
444 // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
445 type ClassifyAddDelSessionReply struct {
446 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
449 func (m *ClassifyAddDelSessionReply) Reset() { *m = ClassifyAddDelSessionReply{} }
450 func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
451 func (*ClassifyAddDelSessionReply) GetCrcString() string { return "e8d4e804" }
452 func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
453 return api.ReplyMessage
456 func (m *ClassifyAddDelSessionReply) Size() (size int) {
460 size += 4 // m.Retval
463 func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
465 b = make([]byte, m.Size())
467 buf := codec.NewBuffer(b)
468 buf.EncodeInt32(m.Retval)
469 return buf.Bytes(), nil
471 func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
472 buf := codec.NewBuffer(b)
473 m.Retval = buf.DecodeInt32()
477 // ClassifyAddDelTable defines message 'classify_add_del_table'.
478 type ClassifyAddDelTable struct {
479 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
480 DelChain bool `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
481 TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
482 Nbuckets uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
483 MemorySize uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
484 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
485 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
486 NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
487 MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
488 CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
489 CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
490 MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
491 Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
494 func (m *ClassifyAddDelTable) Reset() { *m = ClassifyAddDelTable{} }
495 func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
496 func (*ClassifyAddDelTable) GetCrcString() string { return "6849e39e" }
497 func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
498 return api.RequestMessage
501 func (m *ClassifyAddDelTable) Size() (size int) {
506 size += 1 // m.DelChain
507 size += 4 // m.TableIndex
508 size += 4 // m.Nbuckets
509 size += 4 // m.MemorySize
510 size += 4 // m.SkipNVectors
511 size += 4 // m.MatchNVectors
512 size += 4 // m.NextTableIndex
513 size += 4 // m.MissNextIndex
514 size += 1 // m.CurrentDataFlag
515 size += 2 // m.CurrentDataOffset
516 size += 4 // m.MaskLen
517 size += 1 * len(m.Mask) // m.Mask
520 func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
522 b = make([]byte, m.Size())
524 buf := codec.NewBuffer(b)
525 buf.EncodeBool(m.IsAdd)
526 buf.EncodeBool(m.DelChain)
527 buf.EncodeUint32(m.TableIndex)
528 buf.EncodeUint32(m.Nbuckets)
529 buf.EncodeUint32(m.MemorySize)
530 buf.EncodeUint32(m.SkipNVectors)
531 buf.EncodeUint32(m.MatchNVectors)
532 buf.EncodeUint32(m.NextTableIndex)
533 buf.EncodeUint32(m.MissNextIndex)
534 buf.EncodeUint8(m.CurrentDataFlag)
535 buf.EncodeInt16(m.CurrentDataOffset)
536 buf.EncodeUint32(uint32(len(m.Mask)))
537 buf.EncodeBytes(m.Mask, 0)
538 return buf.Bytes(), nil
540 func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
541 buf := codec.NewBuffer(b)
542 m.IsAdd = buf.DecodeBool()
543 m.DelChain = buf.DecodeBool()
544 m.TableIndex = buf.DecodeUint32()
545 m.Nbuckets = buf.DecodeUint32()
546 m.MemorySize = buf.DecodeUint32()
547 m.SkipNVectors = buf.DecodeUint32()
548 m.MatchNVectors = buf.DecodeUint32()
549 m.NextTableIndex = buf.DecodeUint32()
550 m.MissNextIndex = buf.DecodeUint32()
551 m.CurrentDataFlag = buf.DecodeUint8()
552 m.CurrentDataOffset = buf.DecodeInt16()
553 m.MaskLen = buf.DecodeUint32()
554 m.Mask = make([]byte, m.MaskLen)
555 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
559 // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
560 type ClassifyAddDelTableReply struct {
561 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
562 NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
563 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
564 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
567 func (m *ClassifyAddDelTableReply) Reset() { *m = ClassifyAddDelTableReply{} }
568 func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
569 func (*ClassifyAddDelTableReply) GetCrcString() string { return "05486349" }
570 func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
571 return api.ReplyMessage
574 func (m *ClassifyAddDelTableReply) Size() (size int) {
578 size += 4 // m.Retval
579 size += 4 // m.NewTableIndex
580 size += 4 // m.SkipNVectors
581 size += 4 // m.MatchNVectors
584 func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
586 b = make([]byte, m.Size())
588 buf := codec.NewBuffer(b)
589 buf.EncodeInt32(m.Retval)
590 buf.EncodeUint32(m.NewTableIndex)
591 buf.EncodeUint32(m.SkipNVectors)
592 buf.EncodeUint32(m.MatchNVectors)
593 return buf.Bytes(), nil
595 func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
596 buf := codec.NewBuffer(b)
597 m.Retval = buf.DecodeInt32()
598 m.NewTableIndex = buf.DecodeUint32()
599 m.SkipNVectors = buf.DecodeUint32()
600 m.MatchNVectors = buf.DecodeUint32()
604 // ClassifySessionDetails defines message 'classify_session_details'.
605 type ClassifySessionDetails struct {
606 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
607 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
608 HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
609 Advance int32 `binapi:"i32,name=advance" json:"advance,omitempty"`
610 OpaqueIndex uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
611 MatchLength uint32 `binapi:"u32,name=match_length" json:"-"`
612 Match []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
615 func (m *ClassifySessionDetails) Reset() { *m = ClassifySessionDetails{} }
616 func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
617 func (*ClassifySessionDetails) GetCrcString() string { return "60e3ef94" }
618 func (*ClassifySessionDetails) GetMessageType() api.MessageType {
619 return api.ReplyMessage
622 func (m *ClassifySessionDetails) Size() (size int) {
626 size += 4 // m.Retval
627 size += 4 // m.TableID
628 size += 4 // m.HitNextIndex
629 size += 4 // m.Advance
630 size += 4 // m.OpaqueIndex
631 size += 4 // m.MatchLength
632 size += 1 * len(m.Match) // m.Match
635 func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
637 b = make([]byte, m.Size())
639 buf := codec.NewBuffer(b)
640 buf.EncodeInt32(m.Retval)
641 buf.EncodeUint32(m.TableID)
642 buf.EncodeUint32(m.HitNextIndex)
643 buf.EncodeInt32(m.Advance)
644 buf.EncodeUint32(m.OpaqueIndex)
645 buf.EncodeUint32(uint32(len(m.Match)))
646 buf.EncodeBytes(m.Match, 0)
647 return buf.Bytes(), nil
649 func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
650 buf := codec.NewBuffer(b)
651 m.Retval = buf.DecodeInt32()
652 m.TableID = buf.DecodeUint32()
653 m.HitNextIndex = buf.DecodeUint32()
654 m.Advance = buf.DecodeInt32()
655 m.OpaqueIndex = buf.DecodeUint32()
656 m.MatchLength = buf.DecodeUint32()
657 m.Match = make([]byte, m.MatchLength)
658 copy(m.Match, buf.DecodeBytes(len(m.Match)))
662 // ClassifySessionDump defines message 'classify_session_dump'.
663 type ClassifySessionDump struct {
664 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
667 func (m *ClassifySessionDump) Reset() { *m = ClassifySessionDump{} }
668 func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
669 func (*ClassifySessionDump) GetCrcString() string { return "0cca2cd9" }
670 func (*ClassifySessionDump) GetMessageType() api.MessageType {
671 return api.RequestMessage
674 func (m *ClassifySessionDump) Size() (size int) {
678 size += 4 // m.TableID
681 func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
683 b = make([]byte, m.Size())
685 buf := codec.NewBuffer(b)
686 buf.EncodeUint32(m.TableID)
687 return buf.Bytes(), nil
689 func (m *ClassifySessionDump) Unmarshal(b []byte) error {
690 buf := codec.NewBuffer(b)
691 m.TableID = buf.DecodeUint32()
695 // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
696 type ClassifySetInterfaceIPTable struct {
697 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
698 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
699 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
702 func (m *ClassifySetInterfaceIPTable) Reset() { *m = ClassifySetInterfaceIPTable{} }
703 func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
704 func (*ClassifySetInterfaceIPTable) GetCrcString() string { return "e0b097c7" }
705 func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
706 return api.RequestMessage
709 func (m *ClassifySetInterfaceIPTable) Size() (size int) {
713 size += 1 // m.IsIPv6
714 size += 4 // m.SwIfIndex
715 size += 4 // m.TableIndex
718 func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
720 b = make([]byte, m.Size())
722 buf := codec.NewBuffer(b)
723 buf.EncodeBool(m.IsIPv6)
724 buf.EncodeUint32(uint32(m.SwIfIndex))
725 buf.EncodeUint32(m.TableIndex)
726 return buf.Bytes(), nil
728 func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
729 buf := codec.NewBuffer(b)
730 m.IsIPv6 = buf.DecodeBool()
731 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
732 m.TableIndex = buf.DecodeUint32()
736 // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
737 type ClassifySetInterfaceIPTableReply struct {
738 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
741 func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
742 func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
743 return "classify_set_interface_ip_table_reply"
745 func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
746 func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
747 return api.ReplyMessage
750 func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
754 size += 4 // m.Retval
757 func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
759 b = make([]byte, m.Size())
761 buf := codec.NewBuffer(b)
762 buf.EncodeInt32(m.Retval)
763 return buf.Bytes(), nil
765 func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
766 buf := codec.NewBuffer(b)
767 m.Retval = buf.DecodeInt32()
771 // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
772 type ClassifySetInterfaceL2Tables struct {
773 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
774 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
775 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
776 OtherTableIndex uint32 `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
777 IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"`
780 func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
781 func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
782 return "classify_set_interface_l2_tables"
784 func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
785 func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
786 return api.RequestMessage
789 func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
793 size += 4 // m.SwIfIndex
794 size += 4 // m.IP4TableIndex
795 size += 4 // m.IP6TableIndex
796 size += 4 // m.OtherTableIndex
797 size += 1 // m.IsInput
800 func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
802 b = make([]byte, m.Size())
804 buf := codec.NewBuffer(b)
805 buf.EncodeUint32(uint32(m.SwIfIndex))
806 buf.EncodeUint32(m.IP4TableIndex)
807 buf.EncodeUint32(m.IP6TableIndex)
808 buf.EncodeUint32(m.OtherTableIndex)
809 buf.EncodeBool(m.IsInput)
810 return buf.Bytes(), nil
812 func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
813 buf := codec.NewBuffer(b)
814 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
815 m.IP4TableIndex = buf.DecodeUint32()
816 m.IP6TableIndex = buf.DecodeUint32()
817 m.OtherTableIndex = buf.DecodeUint32()
818 m.IsInput = buf.DecodeBool()
822 // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
823 type ClassifySetInterfaceL2TablesReply struct {
824 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
827 func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
828 func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
829 return "classify_set_interface_l2_tables_reply"
831 func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
832 func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
833 return api.ReplyMessage
836 func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
840 size += 4 // m.Retval
843 func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
845 b = make([]byte, m.Size())
847 buf := codec.NewBuffer(b)
848 buf.EncodeInt32(m.Retval)
849 return buf.Bytes(), nil
851 func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
852 buf := codec.NewBuffer(b)
853 m.Retval = buf.DecodeInt32()
857 // ClassifyTableByInterface defines message 'classify_table_by_interface'.
858 type ClassifyTableByInterface struct {
859 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
862 func (m *ClassifyTableByInterface) Reset() { *m = ClassifyTableByInterface{} }
863 func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
864 func (*ClassifyTableByInterface) GetCrcString() string { return "f9e6675e" }
865 func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
866 return api.RequestMessage
869 func (m *ClassifyTableByInterface) Size() (size int) {
873 size += 4 // m.SwIfIndex
876 func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
878 b = make([]byte, m.Size())
880 buf := codec.NewBuffer(b)
881 buf.EncodeUint32(uint32(m.SwIfIndex))
882 return buf.Bytes(), nil
884 func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
885 buf := codec.NewBuffer(b)
886 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
890 // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
891 type ClassifyTableByInterfaceReply struct {
892 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
893 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
894 L2TableID uint32 `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
895 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
896 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
899 func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
900 func (*ClassifyTableByInterfaceReply) GetMessageName() string {
901 return "classify_table_by_interface_reply"
903 func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
904 func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
905 return api.ReplyMessage
908 func (m *ClassifyTableByInterfaceReply) Size() (size int) {
912 size += 4 // m.Retval
913 size += 4 // m.SwIfIndex
914 size += 4 // m.L2TableID
915 size += 4 // m.IP4TableID
916 size += 4 // m.IP6TableID
919 func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
921 b = make([]byte, m.Size())
923 buf := codec.NewBuffer(b)
924 buf.EncodeInt32(m.Retval)
925 buf.EncodeUint32(uint32(m.SwIfIndex))
926 buf.EncodeUint32(m.L2TableID)
927 buf.EncodeUint32(m.IP4TableID)
928 buf.EncodeUint32(m.IP6TableID)
929 return buf.Bytes(), nil
931 func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
932 buf := codec.NewBuffer(b)
933 m.Retval = buf.DecodeInt32()
934 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
935 m.L2TableID = buf.DecodeUint32()
936 m.IP4TableID = buf.DecodeUint32()
937 m.IP6TableID = buf.DecodeUint32()
941 // ClassifyTableIds defines message 'classify_table_ids'.
942 type ClassifyTableIds struct{}
944 func (m *ClassifyTableIds) Reset() { *m = ClassifyTableIds{} }
945 func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
946 func (*ClassifyTableIds) GetCrcString() string { return "51077d14" }
947 func (*ClassifyTableIds) GetMessageType() api.MessageType {
948 return api.RequestMessage
951 func (m *ClassifyTableIds) Size() (size int) {
957 func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
959 b = make([]byte, m.Size())
961 buf := codec.NewBuffer(b)
962 return buf.Bytes(), nil
964 func (m *ClassifyTableIds) Unmarshal(b []byte) error {
968 // ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
969 type ClassifyTableIdsReply struct {
970 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
971 Count uint32 `binapi:"u32,name=count" json:"-"`
972 Ids []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
975 func (m *ClassifyTableIdsReply) Reset() { *m = ClassifyTableIdsReply{} }
976 func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
977 func (*ClassifyTableIdsReply) GetCrcString() string { return "d1d20e1d" }
978 func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
979 return api.ReplyMessage
982 func (m *ClassifyTableIdsReply) Size() (size int) {
986 size += 4 // m.Retval
988 size += 4 * len(m.Ids) // m.Ids
991 func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
993 b = make([]byte, m.Size())
995 buf := codec.NewBuffer(b)
996 buf.EncodeInt32(m.Retval)
997 buf.EncodeUint32(uint32(len(m.Ids)))
998 for i := 0; i < len(m.Ids); i++ {
1001 x = uint32(m.Ids[i])
1005 return buf.Bytes(), nil
1007 func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
1008 buf := codec.NewBuffer(b)
1009 m.Retval = buf.DecodeInt32()
1010 m.Count = buf.DecodeUint32()
1011 m.Ids = make([]uint32, m.Count)
1012 for i := 0; i < len(m.Ids); i++ {
1013 m.Ids[i] = buf.DecodeUint32()
1018 // ClassifyTableInfo defines message 'classify_table_info'.
1019 type ClassifyTableInfo struct {
1020 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1023 func (m *ClassifyTableInfo) Reset() { *m = ClassifyTableInfo{} }
1024 func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
1025 func (*ClassifyTableInfo) GetCrcString() string { return "0cca2cd9" }
1026 func (*ClassifyTableInfo) GetMessageType() api.MessageType {
1027 return api.RequestMessage
1030 func (m *ClassifyTableInfo) Size() (size int) {
1034 size += 4 // m.TableID
1037 func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
1039 b = make([]byte, m.Size())
1041 buf := codec.NewBuffer(b)
1042 buf.EncodeUint32(m.TableID)
1043 return buf.Bytes(), nil
1045 func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
1046 buf := codec.NewBuffer(b)
1047 m.TableID = buf.DecodeUint32()
1051 // ClassifyTableInfoReply defines message 'classify_table_info_reply'.
1052 type ClassifyTableInfoReply struct {
1053 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1054 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1055 Nbuckets uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
1056 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
1057 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
1058 ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
1059 NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
1060 MissNextIndex uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
1061 MaskLength uint32 `binapi:"u32,name=mask_length" json:"-"`
1062 Mask []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
1065 func (m *ClassifyTableInfoReply) Reset() { *m = ClassifyTableInfoReply{} }
1066 func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
1067 func (*ClassifyTableInfoReply) GetCrcString() string { return "4a573c0e" }
1068 func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
1069 return api.ReplyMessage
1072 func (m *ClassifyTableInfoReply) Size() (size int) {
1076 size += 4 // m.Retval
1077 size += 4 // m.TableID
1078 size += 4 // m.Nbuckets
1079 size += 4 // m.MatchNVectors
1080 size += 4 // m.SkipNVectors
1081 size += 4 // m.ActiveSessions
1082 size += 4 // m.NextTableIndex
1083 size += 4 // m.MissNextIndex
1084 size += 4 // m.MaskLength
1085 size += 1 * len(m.Mask) // m.Mask
1088 func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
1090 b = make([]byte, m.Size())
1092 buf := codec.NewBuffer(b)
1093 buf.EncodeInt32(m.Retval)
1094 buf.EncodeUint32(m.TableID)
1095 buf.EncodeUint32(m.Nbuckets)
1096 buf.EncodeUint32(m.MatchNVectors)
1097 buf.EncodeUint32(m.SkipNVectors)
1098 buf.EncodeUint32(m.ActiveSessions)
1099 buf.EncodeUint32(m.NextTableIndex)
1100 buf.EncodeUint32(m.MissNextIndex)
1101 buf.EncodeUint32(uint32(len(m.Mask)))
1102 buf.EncodeBytes(m.Mask, 0)
1103 return buf.Bytes(), nil
1105 func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
1106 buf := codec.NewBuffer(b)
1107 m.Retval = buf.DecodeInt32()
1108 m.TableID = buf.DecodeUint32()
1109 m.Nbuckets = buf.DecodeUint32()
1110 m.MatchNVectors = buf.DecodeUint32()
1111 m.SkipNVectors = buf.DecodeUint32()
1112 m.ActiveSessions = buf.DecodeUint32()
1113 m.NextTableIndex = buf.DecodeUint32()
1114 m.MissNextIndex = buf.DecodeUint32()
1115 m.MaskLength = buf.DecodeUint32()
1116 m.Mask = make([]byte, m.MaskLength)
1117 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
1121 // FlowClassifyDetails defines message 'flow_classify_details'.
1122 type FlowClassifyDetails struct {
1123 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1124 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1127 func (m *FlowClassifyDetails) Reset() { *m = FlowClassifyDetails{} }
1128 func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
1129 func (*FlowClassifyDetails) GetCrcString() string { return "dfd08765" }
1130 func (*FlowClassifyDetails) GetMessageType() api.MessageType {
1131 return api.ReplyMessage
1134 func (m *FlowClassifyDetails) Size() (size int) {
1138 size += 4 // m.SwIfIndex
1139 size += 4 // m.TableIndex
1142 func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
1144 b = make([]byte, m.Size())
1146 buf := codec.NewBuffer(b)
1147 buf.EncodeUint32(uint32(m.SwIfIndex))
1148 buf.EncodeUint32(m.TableIndex)
1149 return buf.Bytes(), nil
1151 func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
1152 buf := codec.NewBuffer(b)
1153 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1154 m.TableIndex = buf.DecodeUint32()
1158 // FlowClassifyDump defines message 'flow_classify_dump'.
1159 type FlowClassifyDump struct {
1160 Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
1161 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1164 func (m *FlowClassifyDump) Reset() { *m = FlowClassifyDump{} }
1165 func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
1166 func (*FlowClassifyDump) GetCrcString() string { return "8a6ad43d" }
1167 func (*FlowClassifyDump) GetMessageType() api.MessageType {
1168 return api.RequestMessage
1171 func (m *FlowClassifyDump) Size() (size int) {
1176 size += 4 // m.SwIfIndex
1179 func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
1181 b = make([]byte, m.Size())
1183 buf := codec.NewBuffer(b)
1184 buf.EncodeUint8(uint8(m.Type))
1185 buf.EncodeUint32(uint32(m.SwIfIndex))
1186 return buf.Bytes(), nil
1188 func (m *FlowClassifyDump) Unmarshal(b []byte) error {
1189 buf := codec.NewBuffer(b)
1190 m.Type = FlowClassifyTable(buf.DecodeUint8())
1191 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1195 // FlowClassifySetInterface defines message 'flow_classify_set_interface'.
1196 type FlowClassifySetInterface struct {
1197 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1198 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1199 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1200 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1203 func (m *FlowClassifySetInterface) Reset() { *m = FlowClassifySetInterface{} }
1204 func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
1205 func (*FlowClassifySetInterface) GetCrcString() string { return "b6192f1c" }
1206 func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
1207 return api.RequestMessage
1210 func (m *FlowClassifySetInterface) Size() (size int) {
1214 size += 4 // m.SwIfIndex
1215 size += 4 // m.IP4TableIndex
1216 size += 4 // m.IP6TableIndex
1217 size += 1 // m.IsAdd
1220 func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1222 b = make([]byte, m.Size())
1224 buf := codec.NewBuffer(b)
1225 buf.EncodeUint32(uint32(m.SwIfIndex))
1226 buf.EncodeUint32(m.IP4TableIndex)
1227 buf.EncodeUint32(m.IP6TableIndex)
1228 buf.EncodeBool(m.IsAdd)
1229 return buf.Bytes(), nil
1231 func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
1232 buf := codec.NewBuffer(b)
1233 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1234 m.IP4TableIndex = buf.DecodeUint32()
1235 m.IP6TableIndex = buf.DecodeUint32()
1236 m.IsAdd = buf.DecodeBool()
1240 // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
1241 type FlowClassifySetInterfaceReply struct {
1242 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1245 func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
1246 func (*FlowClassifySetInterfaceReply) GetMessageName() string {
1247 return "flow_classify_set_interface_reply"
1249 func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1250 func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
1251 return api.ReplyMessage
1254 func (m *FlowClassifySetInterfaceReply) Size() (size int) {
1258 size += 4 // m.Retval
1261 func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1263 b = make([]byte, m.Size())
1265 buf := codec.NewBuffer(b)
1266 buf.EncodeInt32(m.Retval)
1267 return buf.Bytes(), nil
1269 func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
1270 buf := codec.NewBuffer(b)
1271 m.Retval = buf.DecodeInt32()
1275 // InputACLSetInterface defines message 'input_acl_set_interface'.
1276 type InputACLSetInterface struct {
1277 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1278 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1279 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1280 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1281 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1284 func (m *InputACLSetInterface) Reset() { *m = InputACLSetInterface{} }
1285 func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
1286 func (*InputACLSetInterface) GetCrcString() string { return "de7ad708" }
1287 func (*InputACLSetInterface) GetMessageType() api.MessageType {
1288 return api.RequestMessage
1291 func (m *InputACLSetInterface) Size() (size int) {
1295 size += 4 // m.SwIfIndex
1296 size += 4 // m.IP4TableIndex
1297 size += 4 // m.IP6TableIndex
1298 size += 4 // m.L2TableIndex
1299 size += 1 // m.IsAdd
1302 func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1304 b = make([]byte, m.Size())
1306 buf := codec.NewBuffer(b)
1307 buf.EncodeUint32(uint32(m.SwIfIndex))
1308 buf.EncodeUint32(m.IP4TableIndex)
1309 buf.EncodeUint32(m.IP6TableIndex)
1310 buf.EncodeUint32(m.L2TableIndex)
1311 buf.EncodeBool(m.IsAdd)
1312 return buf.Bytes(), nil
1314 func (m *InputACLSetInterface) Unmarshal(b []byte) error {
1315 buf := codec.NewBuffer(b)
1316 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1317 m.IP4TableIndex = buf.DecodeUint32()
1318 m.IP6TableIndex = buf.DecodeUint32()
1319 m.L2TableIndex = buf.DecodeUint32()
1320 m.IsAdd = buf.DecodeBool()
1324 // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
1325 type InputACLSetInterfaceReply struct {
1326 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1329 func (m *InputACLSetInterfaceReply) Reset() { *m = InputACLSetInterfaceReply{} }
1330 func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
1331 func (*InputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1332 func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
1333 return api.ReplyMessage
1336 func (m *InputACLSetInterfaceReply) Size() (size int) {
1340 size += 4 // m.Retval
1343 func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1345 b = make([]byte, m.Size())
1347 buf := codec.NewBuffer(b)
1348 buf.EncodeInt32(m.Retval)
1349 return buf.Bytes(), nil
1351 func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
1352 buf := codec.NewBuffer(b)
1353 m.Retval = buf.DecodeInt32()
1357 // OutputACLSetInterface defines message 'output_acl_set_interface'.
1358 type OutputACLSetInterface struct {
1359 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1360 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1361 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1362 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1363 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1366 func (m *OutputACLSetInterface) Reset() { *m = OutputACLSetInterface{} }
1367 func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
1368 func (*OutputACLSetInterface) GetCrcString() string { return "de7ad708" }
1369 func (*OutputACLSetInterface) GetMessageType() api.MessageType {
1370 return api.RequestMessage
1373 func (m *OutputACLSetInterface) Size() (size int) {
1377 size += 4 // m.SwIfIndex
1378 size += 4 // m.IP4TableIndex
1379 size += 4 // m.IP6TableIndex
1380 size += 4 // m.L2TableIndex
1381 size += 1 // m.IsAdd
1384 func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1386 b = make([]byte, m.Size())
1388 buf := codec.NewBuffer(b)
1389 buf.EncodeUint32(uint32(m.SwIfIndex))
1390 buf.EncodeUint32(m.IP4TableIndex)
1391 buf.EncodeUint32(m.IP6TableIndex)
1392 buf.EncodeUint32(m.L2TableIndex)
1393 buf.EncodeBool(m.IsAdd)
1394 return buf.Bytes(), nil
1396 func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
1397 buf := codec.NewBuffer(b)
1398 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1399 m.IP4TableIndex = buf.DecodeUint32()
1400 m.IP6TableIndex = buf.DecodeUint32()
1401 m.L2TableIndex = buf.DecodeUint32()
1402 m.IsAdd = buf.DecodeBool()
1406 // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
1407 type OutputACLSetInterfaceReply struct {
1408 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1411 func (m *OutputACLSetInterfaceReply) Reset() { *m = OutputACLSetInterfaceReply{} }
1412 func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
1413 func (*OutputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1414 func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
1415 return api.ReplyMessage
1418 func (m *OutputACLSetInterfaceReply) Size() (size int) {
1422 size += 4 // m.Retval
1425 func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1427 b = make([]byte, m.Size())
1429 buf := codec.NewBuffer(b)
1430 buf.EncodeInt32(m.Retval)
1431 return buf.Bytes(), nil
1433 func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
1434 buf := codec.NewBuffer(b)
1435 m.Retval = buf.DecodeInt32()
1439 // PolicerClassifyDetails defines message 'policer_classify_details'.
1440 type PolicerClassifyDetails struct {
1441 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1442 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1445 func (m *PolicerClassifyDetails) Reset() { *m = PolicerClassifyDetails{} }
1446 func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
1447 func (*PolicerClassifyDetails) GetCrcString() string { return "dfd08765" }
1448 func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
1449 return api.ReplyMessage
1452 func (m *PolicerClassifyDetails) Size() (size int) {
1456 size += 4 // m.SwIfIndex
1457 size += 4 // m.TableIndex
1460 func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
1462 b = make([]byte, m.Size())
1464 buf := codec.NewBuffer(b)
1465 buf.EncodeUint32(uint32(m.SwIfIndex))
1466 buf.EncodeUint32(m.TableIndex)
1467 return buf.Bytes(), nil
1469 func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
1470 buf := codec.NewBuffer(b)
1471 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1472 m.TableIndex = buf.DecodeUint32()
1476 // PolicerClassifyDump defines message 'policer_classify_dump'.
1477 type PolicerClassifyDump struct {
1478 Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
1479 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1482 func (m *PolicerClassifyDump) Reset() { *m = PolicerClassifyDump{} }
1483 func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
1484 func (*PolicerClassifyDump) GetCrcString() string { return "6bfe6603" }
1485 func (*PolicerClassifyDump) GetMessageType() api.MessageType {
1486 return api.RequestMessage
1489 func (m *PolicerClassifyDump) Size() (size int) {
1494 size += 4 // m.SwIfIndex
1497 func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
1499 b = make([]byte, m.Size())
1501 buf := codec.NewBuffer(b)
1502 buf.EncodeUint8(uint8(m.Type))
1503 buf.EncodeUint32(uint32(m.SwIfIndex))
1504 return buf.Bytes(), nil
1506 func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
1507 buf := codec.NewBuffer(b)
1508 m.Type = PolicerClassifyTable(buf.DecodeUint8())
1509 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1513 // PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
1514 type PolicerClassifySetInterface struct {
1515 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1516 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1517 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1518 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1519 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1522 func (m *PolicerClassifySetInterface) Reset() { *m = PolicerClassifySetInterface{} }
1523 func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
1524 func (*PolicerClassifySetInterface) GetCrcString() string { return "de7ad708" }
1525 func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
1526 return api.RequestMessage
1529 func (m *PolicerClassifySetInterface) Size() (size int) {
1533 size += 4 // m.SwIfIndex
1534 size += 4 // m.IP4TableIndex
1535 size += 4 // m.IP6TableIndex
1536 size += 4 // m.L2TableIndex
1537 size += 1 // m.IsAdd
1540 func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1542 b = make([]byte, m.Size())
1544 buf := codec.NewBuffer(b)
1545 buf.EncodeUint32(uint32(m.SwIfIndex))
1546 buf.EncodeUint32(m.IP4TableIndex)
1547 buf.EncodeUint32(m.IP6TableIndex)
1548 buf.EncodeUint32(m.L2TableIndex)
1549 buf.EncodeBool(m.IsAdd)
1550 return buf.Bytes(), nil
1552 func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
1553 buf := codec.NewBuffer(b)
1554 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1555 m.IP4TableIndex = buf.DecodeUint32()
1556 m.IP6TableIndex = buf.DecodeUint32()
1557 m.L2TableIndex = buf.DecodeUint32()
1558 m.IsAdd = buf.DecodeBool()
1562 // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
1563 type PolicerClassifySetInterfaceReply struct {
1564 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1567 func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
1568 func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
1569 return "policer_classify_set_interface_reply"
1571 func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1572 func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
1573 return api.ReplyMessage
1576 func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
1580 size += 4 // m.Retval
1583 func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1585 b = make([]byte, m.Size())
1587 buf := codec.NewBuffer(b)
1588 buf.EncodeInt32(m.Retval)
1589 return buf.Bytes(), nil
1591 func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
1592 buf := codec.NewBuffer(b)
1593 m.Retval = buf.DecodeInt32()
1597 func init() { file_classify_binapi_init() }
1598 func file_classify_binapi_init() {
1599 api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
1600 api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
1601 api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
1602 api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
1603 api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
1604 api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
1605 api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
1606 api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
1607 api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
1608 api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
1609 api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
1610 api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
1611 api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
1612 api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
1613 api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
1614 api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
1615 api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
1616 api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
1617 api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
1618 api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
1619 api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
1620 api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
1621 api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
1622 api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
1623 api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
1624 api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
1625 api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
1626 api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
1629 // Messages returns list of all messages in this module.
1630 func AllMessages() []api.Message {
1631 return []api.Message{
1632 (*ClassifyAddDelSession)(nil),
1633 (*ClassifyAddDelSessionReply)(nil),
1634 (*ClassifyAddDelTable)(nil),
1635 (*ClassifyAddDelTableReply)(nil),
1636 (*ClassifySessionDetails)(nil),
1637 (*ClassifySessionDump)(nil),
1638 (*ClassifySetInterfaceIPTable)(nil),
1639 (*ClassifySetInterfaceIPTableReply)(nil),
1640 (*ClassifySetInterfaceL2Tables)(nil),
1641 (*ClassifySetInterfaceL2TablesReply)(nil),
1642 (*ClassifyTableByInterface)(nil),
1643 (*ClassifyTableByInterfaceReply)(nil),
1644 (*ClassifyTableIds)(nil),
1645 (*ClassifyTableIdsReply)(nil),
1646 (*ClassifyTableInfo)(nil),
1647 (*ClassifyTableInfoReply)(nil),
1648 (*FlowClassifyDetails)(nil),
1649 (*FlowClassifyDump)(nil),
1650 (*FlowClassifySetInterface)(nil),
1651 (*FlowClassifySetInterfaceReply)(nil),
1652 (*InputACLSetInterface)(nil),
1653 (*InputACLSetInterfaceReply)(nil),
1654 (*OutputACLSetInterface)(nil),
1655 (*OutputACLSetInterfaceReply)(nil),
1656 (*PolicerClassifyDetails)(nil),
1657 (*PolicerClassifyDump)(nil),
1658 (*PolicerClassifySetInterface)(nil),
1659 (*PolicerClassifySetInterfaceReply)(nil),