// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.5.0-dev
+// VPP: 21.06-release
// source: /usr/share/vpp/api/plugins/abf.api.json
// Package abf contains generated bindings for API file abf.api.
const (
APIFile = "abf"
APIVersion = "1.0.0"
- VersionCrc = 0x460b09b9
+ VersionCrc = 0xf2367b47
)
// AbfItfAttach defines type 'abf_itf_attach'.
}
// AbfItfAttachAddDel defines message 'abf_itf_attach_add_del'.
+// InProgress: the message form may change in the future versions
type AbfItfAttachAddDel struct {
IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
return api.RequestMessage
}
-func (m *AbfItfAttachAddDel) Size() int {
+func (m *AbfItfAttachAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.Attach.PolicyID
size += 4 // m.Attach.SwIfIndex
return size
}
func (m *AbfItfAttachAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Attach.PolicyID))
+ buf.EncodeUint32(m.Attach.PolicyID)
buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
- buf.EncodeUint32(uint32(m.Attach.Priority))
+ buf.EncodeUint32(m.Attach.Priority)
buf.EncodeBool(m.Attach.IsIPv6)
return buf.Bytes(), nil
}
}
// AbfItfAttachAddDelReply defines message 'abf_itf_attach_add_del_reply'.
+// InProgress: the message form may change in the future versions
type AbfItfAttachAddDelReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
return api.ReplyMessage
}
-func (m *AbfItfAttachAddDelReply) Size() int {
+func (m *AbfItfAttachAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *AbfItfAttachAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *AbfItfAttachAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
// AbfItfAttachDetails defines message 'abf_itf_attach_details'.
+// InProgress: the message form may change in the future versions
type AbfItfAttachDetails struct {
Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
}
return api.ReplyMessage
}
-func (m *AbfItfAttachDetails) Size() int {
+func (m *AbfItfAttachDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Attach.PolicyID
size += 4 // m.Attach.SwIfIndex
size += 4 // m.Attach.Priority
return size
}
func (m *AbfItfAttachDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Attach.PolicyID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Attach.PolicyID)
buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
- buf.EncodeUint32(uint32(m.Attach.Priority))
+ buf.EncodeUint32(m.Attach.Priority)
buf.EncodeBool(m.Attach.IsIPv6)
return buf.Bytes(), nil
}
}
// AbfItfAttachDump defines message 'abf_itf_attach_dump'.
+// InProgress: the message form may change in the future versions
type AbfItfAttachDump struct{}
func (m *AbfItfAttachDump) Reset() { *m = AbfItfAttachDump{} }
return api.RequestMessage
}
-func (m *AbfItfAttachDump) Size() int {
+func (m *AbfItfAttachDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *AbfItfAttachDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *AbfItfAttachDump) Unmarshal(b []byte) error {
}
// AbfPluginGetVersion defines message 'abf_plugin_get_version'.
+// InProgress: the message form may change in the future versions
type AbfPluginGetVersion struct{}
func (m *AbfPluginGetVersion) Reset() { *m = AbfPluginGetVersion{} }
return api.RequestMessage
}
-func (m *AbfPluginGetVersion) Size() int {
+func (m *AbfPluginGetVersion) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *AbfPluginGetVersion) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *AbfPluginGetVersion) Unmarshal(b []byte) error {
}
// AbfPluginGetVersionReply defines message 'abf_plugin_get_version_reply'.
+// InProgress: the message form may change in the future versions
type AbfPluginGetVersionReply struct {
Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
return api.ReplyMessage
}
-func (m *AbfPluginGetVersionReply) Size() int {
+func (m *AbfPluginGetVersionReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Major
size += 4 // m.Minor
return size
}
func (m *AbfPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Major))
- buf.EncodeUint32(uint32(m.Minor))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Major)
+ buf.EncodeUint32(m.Minor)
return buf.Bytes(), nil
}
func (m *AbfPluginGetVersionReply) Unmarshal(b []byte) error {
}
// AbfPolicyAddDel defines message 'abf_policy_add_del'.
+// InProgress: the message form may change in the future versions
type AbfPolicyAddDel struct {
IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
func (m *AbfPolicyAddDel) Reset() { *m = AbfPolicyAddDel{} }
func (*AbfPolicyAddDel) GetMessageName() string { return "abf_policy_add_del" }
-func (*AbfPolicyAddDel) GetCrcString() string { return "ee66f93e" }
+func (*AbfPolicyAddDel) GetCrcString() string { return "c6131197" }
func (*AbfPolicyAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *AbfPolicyAddDel) Size() int {
+func (m *AbfPolicyAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.Policy.PolicyID
size += 4 // m.Policy.ACLIndex
size += 4 // s2.Nh.ClassifyTableIndex
size += 1 // s2.NLabels
for j3 := 0; j3 < 16; j3++ {
- var s3 fib_types.FibMplsLabel
- _ = s3
- if j3 < len(s2.LabelStack) {
- s3 = s2.LabelStack[j3]
- }
- size += 1 // s3.IsUniform
- size += 4 // s3.Label
- size += 1 // s3.TTL
- size += 1 // s3.Exp
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
}
}
return size
}
func (m *AbfPolicyAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Policy.PolicyID))
- buf.EncodeUint32(uint32(m.Policy.ACLIndex))
+ buf.EncodeUint32(m.Policy.PolicyID)
+ buf.EncodeUint32(m.Policy.ACLIndex)
buf.EncodeUint8(uint8(len(m.Policy.Paths)))
for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
- var v1 fib_types.FibPath
+ var v1 fib_types.FibPath // Paths
if j1 < len(m.Policy.Paths) {
v1 = m.Policy.Paths[j1]
}
- buf.EncodeUint32(uint32(v1.SwIfIndex))
- buf.EncodeUint32(uint32(v1.TableID))
- buf.EncodeUint32(uint32(v1.RpfID))
- buf.EncodeUint8(uint8(v1.Weight))
- buf.EncodeUint8(uint8(v1.Preference))
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
buf.EncodeUint32(uint32(v1.Type))
buf.EncodeUint32(uint32(v1.Flags))
buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.NLabels))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
for j2 := 0; j2 < 16; j2++ {
- var v2 fib_types.FibMplsLabel
- if j2 < len(v1.LabelStack) {
- v2 = v1.LabelStack[j2]
- }
- buf.EncodeUint8(uint8(v2.IsUniform))
- buf.EncodeUint32(uint32(v2.Label))
- buf.EncodeUint8(uint8(v2.TTL))
- buf.EncodeUint8(uint8(v2.Exp))
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
}
}
return buf.Bytes(), nil
m.Policy.PolicyID = buf.DecodeUint32()
m.Policy.ACLIndex = buf.DecodeUint32()
m.Policy.NPaths = buf.DecodeUint8()
- m.Policy.Paths = make([]fib_types.FibPath, int(m.Policy.NPaths))
+ m.Policy.Paths = make([]fib_types.FibPath, m.Policy.NPaths)
for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
m.Policy.Paths[j1].TableID = buf.DecodeUint32()
}
// AbfPolicyAddDelReply defines message 'abf_policy_add_del_reply'.
+// InProgress: the message form may change in the future versions
type AbfPolicyAddDelReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
return api.ReplyMessage
}
-func (m *AbfPolicyAddDelReply) Size() int {
+func (m *AbfPolicyAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *AbfPolicyAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *AbfPolicyAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
// AbfPolicyDetails defines message 'abf_policy_details'.
+// InProgress: the message form may change in the future versions
type AbfPolicyDetails struct {
Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
}
func (m *AbfPolicyDetails) Reset() { *m = AbfPolicyDetails{} }
func (*AbfPolicyDetails) GetMessageName() string { return "abf_policy_details" }
-func (*AbfPolicyDetails) GetCrcString() string { return "6769e504" }
+func (*AbfPolicyDetails) GetCrcString() string { return "b7487fa4" }
func (*AbfPolicyDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *AbfPolicyDetails) Size() int {
+func (m *AbfPolicyDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Policy.PolicyID
size += 4 // m.Policy.ACLIndex
size += 1 // m.Policy.NPaths
size += 4 // s2.Nh.ClassifyTableIndex
size += 1 // s2.NLabels
for j3 := 0; j3 < 16; j3++ {
- var s3 fib_types.FibMplsLabel
- _ = s3
- if j3 < len(s2.LabelStack) {
- s3 = s2.LabelStack[j3]
- }
- size += 1 // s3.IsUniform
- size += 4 // s3.Label
- size += 1 // s3.TTL
- size += 1 // s3.Exp
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
}
}
return size
}
func (m *AbfPolicyDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Policy.PolicyID))
- buf.EncodeUint32(uint32(m.Policy.ACLIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Policy.PolicyID)
+ buf.EncodeUint32(m.Policy.ACLIndex)
buf.EncodeUint8(uint8(len(m.Policy.Paths)))
for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
- var v1 fib_types.FibPath
+ var v1 fib_types.FibPath // Paths
if j1 < len(m.Policy.Paths) {
v1 = m.Policy.Paths[j1]
}
- buf.EncodeUint32(uint32(v1.SwIfIndex))
- buf.EncodeUint32(uint32(v1.TableID))
- buf.EncodeUint32(uint32(v1.RpfID))
- buf.EncodeUint8(uint8(v1.Weight))
- buf.EncodeUint8(uint8(v1.Preference))
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
buf.EncodeUint32(uint32(v1.Type))
buf.EncodeUint32(uint32(v1.Flags))
buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
- buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
- buf.EncodeUint32(uint32(v1.Nh.ObjID))
- buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
- buf.EncodeUint8(uint8(v1.NLabels))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
for j2 := 0; j2 < 16; j2++ {
- var v2 fib_types.FibMplsLabel
- if j2 < len(v1.LabelStack) {
- v2 = v1.LabelStack[j2]
- }
- buf.EncodeUint8(uint8(v2.IsUniform))
- buf.EncodeUint32(uint32(v2.Label))
- buf.EncodeUint8(uint8(v2.TTL))
- buf.EncodeUint8(uint8(v2.Exp))
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
}
}
return buf.Bytes(), nil
m.Policy.PolicyID = buf.DecodeUint32()
m.Policy.ACLIndex = buf.DecodeUint32()
m.Policy.NPaths = buf.DecodeUint8()
- m.Policy.Paths = make([]fib_types.FibPath, int(m.Policy.NPaths))
+ m.Policy.Paths = make([]fib_types.FibPath, m.Policy.NPaths)
for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
m.Policy.Paths[j1].TableID = buf.DecodeUint32()
}
// AbfPolicyDump defines message 'abf_policy_dump'.
+// InProgress: the message form may change in the future versions
type AbfPolicyDump struct{}
func (m *AbfPolicyDump) Reset() { *m = AbfPolicyDump{} }
return api.RequestMessage
}
-func (m *AbfPolicyDump) Size() int {
+func (m *AbfPolicyDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *AbfPolicyDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *AbfPolicyDump) Unmarshal(b []byte) error {
api.RegisterMessage((*AbfItfAttachDump)(nil), "abf_itf_attach_dump_51077d14")
api.RegisterMessage((*AbfPluginGetVersion)(nil), "abf_plugin_get_version_51077d14")
api.RegisterMessage((*AbfPluginGetVersionReply)(nil), "abf_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*AbfPolicyAddDel)(nil), "abf_policy_add_del_ee66f93e")
+ api.RegisterMessage((*AbfPolicyAddDel)(nil), "abf_policy_add_del_c6131197")
api.RegisterMessage((*AbfPolicyAddDelReply)(nil), "abf_policy_add_del_reply_e8d4e804")
- api.RegisterMessage((*AbfPolicyDetails)(nil), "abf_policy_details_6769e504")
+ api.RegisterMessage((*AbfPolicyDetails)(nil), "abf_policy_details_b7487fa4")
api.RegisterMessage((*AbfPolicyDump)(nil), "abf_policy_dump_51077d14")
}