aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/policer/policer.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/policer/policer.ba.go')
-rw-r--r--binapi/policer/policer.ba.go179
1 files changed, 168 insertions, 11 deletions
diff --git a/binapi/policer/policer.ba.go b/binapi/policer/policer.ba.go
index 1314dce..e3c0a07 100644
--- a/binapi/policer/policer.ba.go
+++ b/binapi/policer/policer.ba.go
@@ -1,20 +1,21 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.6.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/policer.api.json
// Package policer contains generated bindings for API file policer.api.
//
// Contents:
-// 4 messages
+// 8 messages
//
package policer
import (
- api "git.fd.io/govpp.git/api"
- policer_types "git.fd.io/govpp.git/binapi/policer_types"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ interface_types "go.fd.io/govpp/binapi/interface_types"
+ policer_types "go.fd.io/govpp/binapi/policer_types"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -26,7 +27,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "policer"
APIVersion = "2.0.0"
- VersionCrc = 0xd9188811
+ VersionCrc = 0xf14848c
)
// PolicerAddDel defines message 'policer_add_del'.
@@ -48,7 +49,7 @@ type PolicerAddDel struct {
func (m *PolicerAddDel) Reset() { *m = PolicerAddDel{} }
func (*PolicerAddDel) GetMessageName() string { return "policer_add_del" }
-func (*PolicerAddDel) GetCrcString() string { return "cb948f6e" }
+func (*PolicerAddDel) GetCrcString() string { return "2b31dd38" }
func (*PolicerAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -156,6 +157,80 @@ func (m *PolicerAddDelReply) Unmarshal(b []byte) error {
return nil
}
+// PolicerBind defines message 'policer_bind'.
+type PolicerBind struct {
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+ WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"`
+ BindEnable bool `binapi:"bool,name=bind_enable" json:"bind_enable,omitempty"`
+}
+
+func (m *PolicerBind) Reset() { *m = PolicerBind{} }
+func (*PolicerBind) GetMessageName() string { return "policer_bind" }
+func (*PolicerBind) GetCrcString() string { return "dcf516f9" }
+func (*PolicerBind) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *PolicerBind) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.Name
+ size += 4 // m.WorkerIndex
+ size += 1 // m.BindEnable
+ return size
+}
+func (m *PolicerBind) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.Name, 64)
+ buf.EncodeUint32(m.WorkerIndex)
+ buf.EncodeBool(m.BindEnable)
+ return buf.Bytes(), nil
+}
+func (m *PolicerBind) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Name = buf.DecodeString(64)
+ m.WorkerIndex = buf.DecodeUint32()
+ m.BindEnable = buf.DecodeBool()
+ return nil
+}
+
+// PolicerBindReply defines message 'policer_bind_reply'.
+type PolicerBindReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *PolicerBindReply) Reset() { *m = PolicerBindReply{} }
+func (*PolicerBindReply) GetMessageName() string { return "policer_bind_reply" }
+func (*PolicerBindReply) GetCrcString() string { return "e8d4e804" }
+func (*PolicerBindReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *PolicerBindReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *PolicerBindReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *PolicerBindReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// PolicerDetails defines message 'policer_details'.
type PolicerDetails struct {
Name string `binapi:"string[64],name=name" json:"name,omitempty"`
@@ -183,7 +258,7 @@ type PolicerDetails struct {
func (m *PolicerDetails) Reset() { *m = PolicerDetails{} }
func (*PolicerDetails) GetMessageName() string { return "policer_details" }
-func (*PolicerDetails) GetCrcString() string { return "a43f781a" }
+func (*PolicerDetails) GetCrcString() string { return "72d0e248" }
func (*PolicerDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
@@ -315,12 +390,90 @@ func (m *PolicerDump) Unmarshal(b []byte) error {
return nil
}
+// PolicerInput defines message 'policer_input'.
+type PolicerInput struct {
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Apply bool `binapi:"bool,name=apply" json:"apply,omitempty"`
+}
+
+func (m *PolicerInput) Reset() { *m = PolicerInput{} }
+func (*PolicerInput) GetMessageName() string { return "policer_input" }
+func (*PolicerInput) GetCrcString() string { return "233f0ef5" }
+func (*PolicerInput) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *PolicerInput) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.Name
+ size += 4 // m.SwIfIndex
+ size += 1 // m.Apply
+ return size
+}
+func (m *PolicerInput) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.Name, 64)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeBool(m.Apply)
+ return buf.Bytes(), nil
+}
+func (m *PolicerInput) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Name = buf.DecodeString(64)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Apply = buf.DecodeBool()
+ return nil
+}
+
+// PolicerInputReply defines message 'policer_input_reply'.
+type PolicerInputReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *PolicerInputReply) Reset() { *m = PolicerInputReply{} }
+func (*PolicerInputReply) GetMessageName() string { return "policer_input_reply" }
+func (*PolicerInputReply) GetCrcString() string { return "e8d4e804" }
+func (*PolicerInputReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *PolicerInputReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *PolicerInputReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *PolicerInputReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
func init() { file_policer_binapi_init() }
func file_policer_binapi_init() {
- api.RegisterMessage((*PolicerAddDel)(nil), "policer_add_del_cb948f6e")
+ api.RegisterMessage((*PolicerAddDel)(nil), "policer_add_del_2b31dd38")
api.RegisterMessage((*PolicerAddDelReply)(nil), "policer_add_del_reply_a177cef2")
- api.RegisterMessage((*PolicerDetails)(nil), "policer_details_a43f781a")
+ api.RegisterMessage((*PolicerBind)(nil), "policer_bind_dcf516f9")
+ api.RegisterMessage((*PolicerBindReply)(nil), "policer_bind_reply_e8d4e804")
+ api.RegisterMessage((*PolicerDetails)(nil), "policer_details_72d0e248")
api.RegisterMessage((*PolicerDump)(nil), "policer_dump_35f1ae0f")
+ api.RegisterMessage((*PolicerInput)(nil), "policer_input_233f0ef5")
+ api.RegisterMessage((*PolicerInputReply)(nil), "policer_input_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
@@ -328,7 +481,11 @@ func AllMessages() []api.Message {
return []api.Message{
(*PolicerAddDel)(nil),
(*PolicerAddDelReply)(nil),
+ (*PolicerBind)(nil),
+ (*PolicerBindReply)(nil),
(*PolicerDetails)(nil),
(*PolicerDump)(nil),
+ (*PolicerInput)(nil),
+ (*PolicerInputReply)(nil),
}
}