1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/qos.api.json
7 // Package qos contains generated bindings for API file qos.api.
19 api "git.fd.io/govpp.git/api"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 _ "git.fd.io/govpp.git/binapi/ip_types"
22 codec "git.fd.io/govpp.git/codec"
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
34 VersionCrc = 0x1749d12c
37 // QosSource defines enum 'qos_source'.
41 QOS_API_SOURCE_EXT QosSource = 0
42 QOS_API_SOURCE_VLAN QosSource = 1
43 QOS_API_SOURCE_MPLS QosSource = 2
44 QOS_API_SOURCE_IP QosSource = 3
48 QosSource_name = map[uint8]string{
49 0: "QOS_API_SOURCE_EXT",
50 1: "QOS_API_SOURCE_VLAN",
51 2: "QOS_API_SOURCE_MPLS",
52 3: "QOS_API_SOURCE_IP",
54 QosSource_value = map[string]uint8{
55 "QOS_API_SOURCE_EXT": 0,
56 "QOS_API_SOURCE_VLAN": 1,
57 "QOS_API_SOURCE_MPLS": 2,
58 "QOS_API_SOURCE_IP": 3,
62 func (x QosSource) String() string {
63 s, ok := QosSource_name[uint8(x)]
67 return "QosSource(" + strconv.Itoa(int(x)) + ")"
70 // QosEgressMap defines type 'qos_egress_map'.
71 type QosEgressMap struct {
72 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
73 Rows [4]QosEgressMapRow `binapi:"qos_egress_map_row[4],name=rows" json:"rows,omitempty"`
76 // QosEgressMapRow defines type 'qos_egress_map_row'.
77 type QosEgressMapRow struct {
78 Outputs []byte `binapi:"u8[256],name=outputs" json:"outputs,omitempty"`
81 // QosMark defines type 'qos_mark'.
83 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
84 MapID uint32 `binapi:"u32,name=map_id" json:"map_id,omitempty"`
85 OutputSource QosSource `binapi:"qos_source,name=output_source" json:"output_source,omitempty"`
88 // QosRecord defines type 'qos_record'.
89 type QosRecord struct {
90 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
91 InputSource QosSource `binapi:"qos_source,name=input_source" json:"input_source,omitempty"`
94 // QosStore defines type 'qos_store'.
95 type QosStore struct {
96 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
97 InputSource QosSource `binapi:"qos_source,name=input_source" json:"input_source,omitempty"`
98 Value uint8 `binapi:"u8,name=value" json:"value,omitempty"`
101 // QosEgressMapDelete defines message 'qos_egress_map_delete'.
102 type QosEgressMapDelete struct {
103 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
106 func (m *QosEgressMapDelete) Reset() { *m = QosEgressMapDelete{} }
107 func (*QosEgressMapDelete) GetMessageName() string { return "qos_egress_map_delete" }
108 func (*QosEgressMapDelete) GetCrcString() string { return "3a91bde5" }
109 func (*QosEgressMapDelete) GetMessageType() api.MessageType {
110 return api.RequestMessage
113 func (m *QosEgressMapDelete) Size() (size int) {
120 func (m *QosEgressMapDelete) Marshal(b []byte) ([]byte, error) {
122 b = make([]byte, m.Size())
124 buf := codec.NewBuffer(b)
125 buf.EncodeUint32(m.ID)
126 return buf.Bytes(), nil
128 func (m *QosEgressMapDelete) Unmarshal(b []byte) error {
129 buf := codec.NewBuffer(b)
130 m.ID = buf.DecodeUint32()
134 // QosEgressMapDeleteReply defines message 'qos_egress_map_delete_reply'.
135 type QosEgressMapDeleteReply struct {
136 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
139 func (m *QosEgressMapDeleteReply) Reset() { *m = QosEgressMapDeleteReply{} }
140 func (*QosEgressMapDeleteReply) GetMessageName() string { return "qos_egress_map_delete_reply" }
141 func (*QosEgressMapDeleteReply) GetCrcString() string { return "e8d4e804" }
142 func (*QosEgressMapDeleteReply) GetMessageType() api.MessageType {
143 return api.ReplyMessage
146 func (m *QosEgressMapDeleteReply) Size() (size int) {
150 size += 4 // m.Retval
153 func (m *QosEgressMapDeleteReply) Marshal(b []byte) ([]byte, error) {
155 b = make([]byte, m.Size())
157 buf := codec.NewBuffer(b)
158 buf.EncodeInt32(m.Retval)
159 return buf.Bytes(), nil
161 func (m *QosEgressMapDeleteReply) Unmarshal(b []byte) error {
162 buf := codec.NewBuffer(b)
163 m.Retval = buf.DecodeInt32()
167 // QosEgressMapDetails defines message 'qos_egress_map_details'.
168 type QosEgressMapDetails struct {
169 Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"`
172 func (m *QosEgressMapDetails) Reset() { *m = QosEgressMapDetails{} }
173 func (*QosEgressMapDetails) GetMessageName() string { return "qos_egress_map_details" }
174 func (*QosEgressMapDetails) GetCrcString() string { return "46c5653c" }
175 func (*QosEgressMapDetails) GetMessageType() api.MessageType {
176 return api.ReplyMessage
179 func (m *QosEgressMapDetails) Size() (size int) {
183 size += 4 // m.Map.ID
184 for j2 := 0; j2 < 4; j2++ {
185 size += 1 * 256 // m.Map.Rows[j2].Outputs
189 func (m *QosEgressMapDetails) Marshal(b []byte) ([]byte, error) {
191 b = make([]byte, m.Size())
193 buf := codec.NewBuffer(b)
194 buf.EncodeUint32(m.Map.ID)
195 for j1 := 0; j1 < 4; j1++ {
196 buf.EncodeBytes(m.Map.Rows[j1].Outputs, 256)
198 return buf.Bytes(), nil
200 func (m *QosEgressMapDetails) Unmarshal(b []byte) error {
201 buf := codec.NewBuffer(b)
202 m.Map.ID = buf.DecodeUint32()
203 for j1 := 0; j1 < 4; j1++ {
204 m.Map.Rows[j1].Outputs = make([]byte, 256)
205 copy(m.Map.Rows[j1].Outputs, buf.DecodeBytes(len(m.Map.Rows[j1].Outputs)))
210 // QosEgressMapDump defines message 'qos_egress_map_dump'.
211 type QosEgressMapDump struct{}
213 func (m *QosEgressMapDump) Reset() { *m = QosEgressMapDump{} }
214 func (*QosEgressMapDump) GetMessageName() string { return "qos_egress_map_dump" }
215 func (*QosEgressMapDump) GetCrcString() string { return "51077d14" }
216 func (*QosEgressMapDump) GetMessageType() api.MessageType {
217 return api.RequestMessage
220 func (m *QosEgressMapDump) Size() (size int) {
226 func (m *QosEgressMapDump) Marshal(b []byte) ([]byte, error) {
228 b = make([]byte, m.Size())
230 buf := codec.NewBuffer(b)
231 return buf.Bytes(), nil
233 func (m *QosEgressMapDump) Unmarshal(b []byte) error {
237 // QosEgressMapUpdate defines message 'qos_egress_map_update'.
238 type QosEgressMapUpdate struct {
239 Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"`
242 func (m *QosEgressMapUpdate) Reset() { *m = QosEgressMapUpdate{} }
243 func (*QosEgressMapUpdate) GetMessageName() string { return "qos_egress_map_update" }
244 func (*QosEgressMapUpdate) GetCrcString() string { return "6d1c065f" }
245 func (*QosEgressMapUpdate) GetMessageType() api.MessageType {
246 return api.RequestMessage
249 func (m *QosEgressMapUpdate) Size() (size int) {
253 size += 4 // m.Map.ID
254 for j2 := 0; j2 < 4; j2++ {
255 size += 1 * 256 // m.Map.Rows[j2].Outputs
259 func (m *QosEgressMapUpdate) Marshal(b []byte) ([]byte, error) {
261 b = make([]byte, m.Size())
263 buf := codec.NewBuffer(b)
264 buf.EncodeUint32(m.Map.ID)
265 for j1 := 0; j1 < 4; j1++ {
266 buf.EncodeBytes(m.Map.Rows[j1].Outputs, 256)
268 return buf.Bytes(), nil
270 func (m *QosEgressMapUpdate) Unmarshal(b []byte) error {
271 buf := codec.NewBuffer(b)
272 m.Map.ID = buf.DecodeUint32()
273 for j1 := 0; j1 < 4; j1++ {
274 m.Map.Rows[j1].Outputs = make([]byte, 256)
275 copy(m.Map.Rows[j1].Outputs, buf.DecodeBytes(len(m.Map.Rows[j1].Outputs)))
280 // QosEgressMapUpdateReply defines message 'qos_egress_map_update_reply'.
281 type QosEgressMapUpdateReply struct {
282 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
285 func (m *QosEgressMapUpdateReply) Reset() { *m = QosEgressMapUpdateReply{} }
286 func (*QosEgressMapUpdateReply) GetMessageName() string { return "qos_egress_map_update_reply" }
287 func (*QosEgressMapUpdateReply) GetCrcString() string { return "e8d4e804" }
288 func (*QosEgressMapUpdateReply) GetMessageType() api.MessageType {
289 return api.ReplyMessage
292 func (m *QosEgressMapUpdateReply) Size() (size int) {
296 size += 4 // m.Retval
299 func (m *QosEgressMapUpdateReply) Marshal(b []byte) ([]byte, error) {
301 b = make([]byte, m.Size())
303 buf := codec.NewBuffer(b)
304 buf.EncodeInt32(m.Retval)
305 return buf.Bytes(), nil
307 func (m *QosEgressMapUpdateReply) Unmarshal(b []byte) error {
308 buf := codec.NewBuffer(b)
309 m.Retval = buf.DecodeInt32()
313 // QosMarkDetails defines message 'qos_mark_details'.
314 type QosMarkDetails struct {
315 Mark QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"`
318 func (m *QosMarkDetails) Reset() { *m = QosMarkDetails{} }
319 func (*QosMarkDetails) GetMessageName() string { return "qos_mark_details" }
320 func (*QosMarkDetails) GetCrcString() string { return "89fe81a9" }
321 func (*QosMarkDetails) GetMessageType() api.MessageType {
322 return api.ReplyMessage
325 func (m *QosMarkDetails) Size() (size int) {
329 size += 4 // m.Mark.SwIfIndex
330 size += 4 // m.Mark.MapID
331 size += 1 // m.Mark.OutputSource
334 func (m *QosMarkDetails) Marshal(b []byte) ([]byte, error) {
336 b = make([]byte, m.Size())
338 buf := codec.NewBuffer(b)
339 buf.EncodeUint32(m.Mark.SwIfIndex)
340 buf.EncodeUint32(m.Mark.MapID)
341 buf.EncodeUint8(uint8(m.Mark.OutputSource))
342 return buf.Bytes(), nil
344 func (m *QosMarkDetails) Unmarshal(b []byte) error {
345 buf := codec.NewBuffer(b)
346 m.Mark.SwIfIndex = buf.DecodeUint32()
347 m.Mark.MapID = buf.DecodeUint32()
348 m.Mark.OutputSource = QosSource(buf.DecodeUint8())
352 // QosMarkDetailsReply defines message 'qos_mark_details_reply'.
353 type QosMarkDetailsReply struct {
354 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
357 func (m *QosMarkDetailsReply) Reset() { *m = QosMarkDetailsReply{} }
358 func (*QosMarkDetailsReply) GetMessageName() string { return "qos_mark_details_reply" }
359 func (*QosMarkDetailsReply) GetCrcString() string { return "e8d4e804" }
360 func (*QosMarkDetailsReply) GetMessageType() api.MessageType {
361 return api.ReplyMessage
364 func (m *QosMarkDetailsReply) Size() (size int) {
368 size += 4 // m.Retval
371 func (m *QosMarkDetailsReply) Marshal(b []byte) ([]byte, error) {
373 b = make([]byte, m.Size())
375 buf := codec.NewBuffer(b)
376 buf.EncodeInt32(m.Retval)
377 return buf.Bytes(), nil
379 func (m *QosMarkDetailsReply) Unmarshal(b []byte) error {
380 buf := codec.NewBuffer(b)
381 m.Retval = buf.DecodeInt32()
385 // QosMarkDump defines message 'qos_mark_dump'.
386 type QosMarkDump struct {
387 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
390 func (m *QosMarkDump) Reset() { *m = QosMarkDump{} }
391 func (*QosMarkDump) GetMessageName() string { return "qos_mark_dump" }
392 func (*QosMarkDump) GetCrcString() string { return "f9e6675e" }
393 func (*QosMarkDump) GetMessageType() api.MessageType {
394 return api.RequestMessage
397 func (m *QosMarkDump) Size() (size int) {
401 size += 4 // m.SwIfIndex
404 func (m *QosMarkDump) Marshal(b []byte) ([]byte, error) {
406 b = make([]byte, m.Size())
408 buf := codec.NewBuffer(b)
409 buf.EncodeUint32(uint32(m.SwIfIndex))
410 return buf.Bytes(), nil
412 func (m *QosMarkDump) Unmarshal(b []byte) error {
413 buf := codec.NewBuffer(b)
414 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
418 // QosMarkEnableDisable defines message 'qos_mark_enable_disable'.
419 type QosMarkEnableDisable struct {
420 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
421 Mark QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"`
424 func (m *QosMarkEnableDisable) Reset() { *m = QosMarkEnableDisable{} }
425 func (*QosMarkEnableDisable) GetMessageName() string { return "qos_mark_enable_disable" }
426 func (*QosMarkEnableDisable) GetCrcString() string { return "1a010f74" }
427 func (*QosMarkEnableDisable) GetMessageType() api.MessageType {
428 return api.RequestMessage
431 func (m *QosMarkEnableDisable) Size() (size int) {
435 size += 1 // m.Enable
436 size += 4 // m.Mark.SwIfIndex
437 size += 4 // m.Mark.MapID
438 size += 1 // m.Mark.OutputSource
441 func (m *QosMarkEnableDisable) Marshal(b []byte) ([]byte, error) {
443 b = make([]byte, m.Size())
445 buf := codec.NewBuffer(b)
446 buf.EncodeBool(m.Enable)
447 buf.EncodeUint32(m.Mark.SwIfIndex)
448 buf.EncodeUint32(m.Mark.MapID)
449 buf.EncodeUint8(uint8(m.Mark.OutputSource))
450 return buf.Bytes(), nil
452 func (m *QosMarkEnableDisable) Unmarshal(b []byte) error {
453 buf := codec.NewBuffer(b)
454 m.Enable = buf.DecodeBool()
455 m.Mark.SwIfIndex = buf.DecodeUint32()
456 m.Mark.MapID = buf.DecodeUint32()
457 m.Mark.OutputSource = QosSource(buf.DecodeUint8())
461 // QosMarkEnableDisableReply defines message 'qos_mark_enable_disable_reply'.
462 type QosMarkEnableDisableReply struct {
463 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
466 func (m *QosMarkEnableDisableReply) Reset() { *m = QosMarkEnableDisableReply{} }
467 func (*QosMarkEnableDisableReply) GetMessageName() string { return "qos_mark_enable_disable_reply" }
468 func (*QosMarkEnableDisableReply) GetCrcString() string { return "e8d4e804" }
469 func (*QosMarkEnableDisableReply) GetMessageType() api.MessageType {
470 return api.ReplyMessage
473 func (m *QosMarkEnableDisableReply) Size() (size int) {
477 size += 4 // m.Retval
480 func (m *QosMarkEnableDisableReply) Marshal(b []byte) ([]byte, error) {
482 b = make([]byte, m.Size())
484 buf := codec.NewBuffer(b)
485 buf.EncodeInt32(m.Retval)
486 return buf.Bytes(), nil
488 func (m *QosMarkEnableDisableReply) Unmarshal(b []byte) error {
489 buf := codec.NewBuffer(b)
490 m.Retval = buf.DecodeInt32()
494 // QosRecordDetails defines message 'qos_record_details'.
495 type QosRecordDetails struct {
496 Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"`
499 func (m *QosRecordDetails) Reset() { *m = QosRecordDetails{} }
500 func (*QosRecordDetails) GetMessageName() string { return "qos_record_details" }
501 func (*QosRecordDetails) GetCrcString() string { return "4956ccdd" }
502 func (*QosRecordDetails) GetMessageType() api.MessageType {
503 return api.ReplyMessage
506 func (m *QosRecordDetails) Size() (size int) {
510 size += 4 // m.Record.SwIfIndex
511 size += 1 // m.Record.InputSource
514 func (m *QosRecordDetails) Marshal(b []byte) ([]byte, error) {
516 b = make([]byte, m.Size())
518 buf := codec.NewBuffer(b)
519 buf.EncodeUint32(uint32(m.Record.SwIfIndex))
520 buf.EncodeUint8(uint8(m.Record.InputSource))
521 return buf.Bytes(), nil
523 func (m *QosRecordDetails) Unmarshal(b []byte) error {
524 buf := codec.NewBuffer(b)
525 m.Record.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
526 m.Record.InputSource = QosSource(buf.DecodeUint8())
530 // QosRecordDump defines message 'qos_record_dump'.
531 type QosRecordDump struct{}
533 func (m *QosRecordDump) Reset() { *m = QosRecordDump{} }
534 func (*QosRecordDump) GetMessageName() string { return "qos_record_dump" }
535 func (*QosRecordDump) GetCrcString() string { return "51077d14" }
536 func (*QosRecordDump) GetMessageType() api.MessageType {
537 return api.RequestMessage
540 func (m *QosRecordDump) Size() (size int) {
546 func (m *QosRecordDump) Marshal(b []byte) ([]byte, error) {
548 b = make([]byte, m.Size())
550 buf := codec.NewBuffer(b)
551 return buf.Bytes(), nil
553 func (m *QosRecordDump) Unmarshal(b []byte) error {
557 // QosRecordEnableDisable defines message 'qos_record_enable_disable'.
558 type QosRecordEnableDisable struct {
559 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
560 Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"`
563 func (m *QosRecordEnableDisable) Reset() { *m = QosRecordEnableDisable{} }
564 func (*QosRecordEnableDisable) GetMessageName() string { return "qos_record_enable_disable" }
565 func (*QosRecordEnableDisable) GetCrcString() string { return "25b33f88" }
566 func (*QosRecordEnableDisable) GetMessageType() api.MessageType {
567 return api.RequestMessage
570 func (m *QosRecordEnableDisable) Size() (size int) {
574 size += 1 // m.Enable
575 size += 4 // m.Record.SwIfIndex
576 size += 1 // m.Record.InputSource
579 func (m *QosRecordEnableDisable) Marshal(b []byte) ([]byte, error) {
581 b = make([]byte, m.Size())
583 buf := codec.NewBuffer(b)
584 buf.EncodeBool(m.Enable)
585 buf.EncodeUint32(uint32(m.Record.SwIfIndex))
586 buf.EncodeUint8(uint8(m.Record.InputSource))
587 return buf.Bytes(), nil
589 func (m *QosRecordEnableDisable) Unmarshal(b []byte) error {
590 buf := codec.NewBuffer(b)
591 m.Enable = buf.DecodeBool()
592 m.Record.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
593 m.Record.InputSource = QosSource(buf.DecodeUint8())
597 // QosRecordEnableDisableReply defines message 'qos_record_enable_disable_reply'.
598 type QosRecordEnableDisableReply struct {
599 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
602 func (m *QosRecordEnableDisableReply) Reset() { *m = QosRecordEnableDisableReply{} }
603 func (*QosRecordEnableDisableReply) GetMessageName() string { return "qos_record_enable_disable_reply" }
604 func (*QosRecordEnableDisableReply) GetCrcString() string { return "e8d4e804" }
605 func (*QosRecordEnableDisableReply) GetMessageType() api.MessageType {
606 return api.ReplyMessage
609 func (m *QosRecordEnableDisableReply) Size() (size int) {
613 size += 4 // m.Retval
616 func (m *QosRecordEnableDisableReply) Marshal(b []byte) ([]byte, error) {
618 b = make([]byte, m.Size())
620 buf := codec.NewBuffer(b)
621 buf.EncodeInt32(m.Retval)
622 return buf.Bytes(), nil
624 func (m *QosRecordEnableDisableReply) Unmarshal(b []byte) error {
625 buf := codec.NewBuffer(b)
626 m.Retval = buf.DecodeInt32()
630 // QosStoreDetails defines message 'qos_store_details'.
631 type QosStoreDetails struct {
632 Store QosStore `binapi:"qos_store,name=store" json:"store,omitempty"`
635 func (m *QosStoreDetails) Reset() { *m = QosStoreDetails{} }
636 func (*QosStoreDetails) GetMessageName() string { return "qos_store_details" }
637 func (*QosStoreDetails) GetCrcString() string { return "038a6d48" }
638 func (*QosStoreDetails) GetMessageType() api.MessageType {
639 return api.ReplyMessage
642 func (m *QosStoreDetails) Size() (size int) {
646 size += 4 // m.Store.SwIfIndex
647 size += 1 // m.Store.InputSource
648 size += 1 // m.Store.Value
651 func (m *QosStoreDetails) Marshal(b []byte) ([]byte, error) {
653 b = make([]byte, m.Size())
655 buf := codec.NewBuffer(b)
656 buf.EncodeUint32(uint32(m.Store.SwIfIndex))
657 buf.EncodeUint8(uint8(m.Store.InputSource))
658 buf.EncodeUint8(m.Store.Value)
659 return buf.Bytes(), nil
661 func (m *QosStoreDetails) Unmarshal(b []byte) error {
662 buf := codec.NewBuffer(b)
663 m.Store.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
664 m.Store.InputSource = QosSource(buf.DecodeUint8())
665 m.Store.Value = buf.DecodeUint8()
669 // QosStoreDump defines message 'qos_store_dump'.
670 type QosStoreDump struct{}
672 func (m *QosStoreDump) Reset() { *m = QosStoreDump{} }
673 func (*QosStoreDump) GetMessageName() string { return "qos_store_dump" }
674 func (*QosStoreDump) GetCrcString() string { return "51077d14" }
675 func (*QosStoreDump) GetMessageType() api.MessageType {
676 return api.RequestMessage
679 func (m *QosStoreDump) Size() (size int) {
685 func (m *QosStoreDump) Marshal(b []byte) ([]byte, error) {
687 b = make([]byte, m.Size())
689 buf := codec.NewBuffer(b)
690 return buf.Bytes(), nil
692 func (m *QosStoreDump) Unmarshal(b []byte) error {
696 // QosStoreEnableDisable defines message 'qos_store_enable_disable'.
697 type QosStoreEnableDisable struct {
698 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
699 Store QosStore `binapi:"qos_store,name=store" json:"store,omitempty"`
702 func (m *QosStoreEnableDisable) Reset() { *m = QosStoreEnableDisable{} }
703 func (*QosStoreEnableDisable) GetMessageName() string { return "qos_store_enable_disable" }
704 func (*QosStoreEnableDisable) GetCrcString() string { return "3507235e" }
705 func (*QosStoreEnableDisable) GetMessageType() api.MessageType {
706 return api.RequestMessage
709 func (m *QosStoreEnableDisable) Size() (size int) {
713 size += 1 // m.Enable
714 size += 4 // m.Store.SwIfIndex
715 size += 1 // m.Store.InputSource
716 size += 1 // m.Store.Value
719 func (m *QosStoreEnableDisable) Marshal(b []byte) ([]byte, error) {
721 b = make([]byte, m.Size())
723 buf := codec.NewBuffer(b)
724 buf.EncodeBool(m.Enable)
725 buf.EncodeUint32(uint32(m.Store.SwIfIndex))
726 buf.EncodeUint8(uint8(m.Store.InputSource))
727 buf.EncodeUint8(m.Store.Value)
728 return buf.Bytes(), nil
730 func (m *QosStoreEnableDisable) Unmarshal(b []byte) error {
731 buf := codec.NewBuffer(b)
732 m.Enable = buf.DecodeBool()
733 m.Store.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
734 m.Store.InputSource = QosSource(buf.DecodeUint8())
735 m.Store.Value = buf.DecodeUint8()
739 // QosStoreEnableDisableReply defines message 'qos_store_enable_disable_reply'.
740 type QosStoreEnableDisableReply struct {
741 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
744 func (m *QosStoreEnableDisableReply) Reset() { *m = QosStoreEnableDisableReply{} }
745 func (*QosStoreEnableDisableReply) GetMessageName() string { return "qos_store_enable_disable_reply" }
746 func (*QosStoreEnableDisableReply) GetCrcString() string { return "e8d4e804" }
747 func (*QosStoreEnableDisableReply) GetMessageType() api.MessageType {
748 return api.ReplyMessage
751 func (m *QosStoreEnableDisableReply) Size() (size int) {
755 size += 4 // m.Retval
758 func (m *QosStoreEnableDisableReply) 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 *QosStoreEnableDisableReply) Unmarshal(b []byte) error {
767 buf := codec.NewBuffer(b)
768 m.Retval = buf.DecodeInt32()
772 func init() { file_qos_binapi_init() }
773 func file_qos_binapi_init() {
774 api.RegisterMessage((*QosEgressMapDelete)(nil), "qos_egress_map_delete_3a91bde5")
775 api.RegisterMessage((*QosEgressMapDeleteReply)(nil), "qos_egress_map_delete_reply_e8d4e804")
776 api.RegisterMessage((*QosEgressMapDetails)(nil), "qos_egress_map_details_46c5653c")
777 api.RegisterMessage((*QosEgressMapDump)(nil), "qos_egress_map_dump_51077d14")
778 api.RegisterMessage((*QosEgressMapUpdate)(nil), "qos_egress_map_update_6d1c065f")
779 api.RegisterMessage((*QosEgressMapUpdateReply)(nil), "qos_egress_map_update_reply_e8d4e804")
780 api.RegisterMessage((*QosMarkDetails)(nil), "qos_mark_details_89fe81a9")
781 api.RegisterMessage((*QosMarkDetailsReply)(nil), "qos_mark_details_reply_e8d4e804")
782 api.RegisterMessage((*QosMarkDump)(nil), "qos_mark_dump_f9e6675e")
783 api.RegisterMessage((*QosMarkEnableDisable)(nil), "qos_mark_enable_disable_1a010f74")
784 api.RegisterMessage((*QosMarkEnableDisableReply)(nil), "qos_mark_enable_disable_reply_e8d4e804")
785 api.RegisterMessage((*QosRecordDetails)(nil), "qos_record_details_4956ccdd")
786 api.RegisterMessage((*QosRecordDump)(nil), "qos_record_dump_51077d14")
787 api.RegisterMessage((*QosRecordEnableDisable)(nil), "qos_record_enable_disable_25b33f88")
788 api.RegisterMessage((*QosRecordEnableDisableReply)(nil), "qos_record_enable_disable_reply_e8d4e804")
789 api.RegisterMessage((*QosStoreDetails)(nil), "qos_store_details_038a6d48")
790 api.RegisterMessage((*QosStoreDump)(nil), "qos_store_dump_51077d14")
791 api.RegisterMessage((*QosStoreEnableDisable)(nil), "qos_store_enable_disable_3507235e")
792 api.RegisterMessage((*QosStoreEnableDisableReply)(nil), "qos_store_enable_disable_reply_e8d4e804")
795 // Messages returns list of all messages in this module.
796 func AllMessages() []api.Message {
797 return []api.Message{
798 (*QosEgressMapDelete)(nil),
799 (*QosEgressMapDeleteReply)(nil),
800 (*QosEgressMapDetails)(nil),
801 (*QosEgressMapDump)(nil),
802 (*QosEgressMapUpdate)(nil),
803 (*QosEgressMapUpdateReply)(nil),
804 (*QosMarkDetails)(nil),
805 (*QosMarkDetailsReply)(nil),
807 (*QosMarkEnableDisable)(nil),
808 (*QosMarkEnableDisableReply)(nil),
809 (*QosRecordDetails)(nil),
810 (*QosRecordDump)(nil),
811 (*QosRecordEnableDisable)(nil),
812 (*QosRecordEnableDisableReply)(nil),
813 (*QosStoreDetails)(nil),
814 (*QosStoreDump)(nil),
815 (*QosStoreEnableDisable)(nil),
816 (*QosStoreEnableDisableReply)(nil),