aboutsummaryrefslogtreecommitdiffstats
path: root/examples/binapi/acl/acl.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/binapi/acl/acl.ba.go')
-rw-r--r--examples/binapi/acl/acl.ba.go3172
1 files changed, 2521 insertions, 651 deletions
diff --git a/examples/binapi/acl/acl.ba.go b/examples/binapi/acl/acl.ba.go
index 1f9528e..b42fb5f 100644
--- a/examples/binapi/acl/acl.ba.go
+++ b/examples/binapi/acl/acl.ba.go
@@ -1,648 +1,2794 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+// versions:
+// binapi-generator: v0.4.0-alpha-1-g435c3f4-dirty
+// VPP: 20.01-45~g7a071e370~b63
// source: /usr/share/vpp/api/plugins/acl.api.json
/*
-Package acl is a generated VPP binary API for 'acl' module.
+Package acl contains generated code for VPP binary API defined by acl.api (version 1.0.1).
It consists of:
+ 38 messages
2 types
- 36 messages
- 18 services
*/
package acl
import (
- bytes "bytes"
- context "context"
+ "bytes"
+ "context"
+ "encoding/binary"
+ "io"
+ "math"
+ "strconv"
+
api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
struc "github.com/lunixbochs/struc"
- io "io"
- strconv "strconv"
)
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
+
const (
// ModuleName is the name of this module.
ModuleName = "acl"
// APIVersion is the API version of this module.
APIVersion = "1.0.1"
// VersionCrc is the CRC of this module.
- VersionCrc = 0x8ed22cb9
+ VersionCrc = 0x11c5c1e5
)
// ACLRule represents VPP binary API type 'acl_rule'.
type ACLRule struct {
- IsPermit uint8
- IsIPv6 uint8
- SrcIPAddr []byte `struc:"[16]byte"`
- SrcIPPrefixLen uint8
- DstIPAddr []byte `struc:"[16]byte"`
- DstIPPrefixLen uint8
- Proto uint8
- SrcportOrIcmptypeFirst uint16
- SrcportOrIcmptypeLast uint16
- DstportOrIcmpcodeFirst uint16
- DstportOrIcmpcodeLast uint16
- TCPFlagsMask uint8
- TCPFlagsValue uint8
-}
-
-func (*ACLRule) GetTypeName() string {
- return "acl_rule"
-}
-func (*ACLRule) GetCrcString() string {
- return "6f99bf4d"
-}
+ IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
+ IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
+ SrcIPAddr []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty" struc:"[16]byte"`
+ SrcIPPrefixLen uint8 `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
+ DstIPAddr []byte `binapi:"u8[16],name=dst_ip_addr" json:"dst_ip_addr,omitempty" struc:"[16]byte"`
+ DstIPPrefixLen uint8 `binapi:"u8,name=dst_ip_prefix_len" json:"dst_ip_prefix_len,omitempty"`
+ Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
+ SrcportOrIcmptypeFirst uint16 `binapi:"u16,name=srcport_or_icmptype_first" json:"srcport_or_icmptype_first,omitempty"`
+ SrcportOrIcmptypeLast uint16 `binapi:"u16,name=srcport_or_icmptype_last" json:"srcport_or_icmptype_last,omitempty"`
+ DstportOrIcmpcodeFirst uint16 `binapi:"u16,name=dstport_or_icmpcode_first" json:"dstport_or_icmpcode_first,omitempty"`
+ DstportOrIcmpcodeLast uint16 `binapi:"u16,name=dstport_or_icmpcode_last" json:"dstport_or_icmpcode_last,omitempty"`
+ TCPFlagsMask uint8 `binapi:"u8,name=tcp_flags_mask" json:"tcp_flags_mask,omitempty"`
+ TCPFlagsValue uint8 `binapi:"u8,name=tcp_flags_value" json:"tcp_flags_value,omitempty"`
+}
+
+func (*ACLRule) GetTypeName() string { return "acl_rule" }
// MacipACLRule represents VPP binary API type 'macip_acl_rule'.
type MacipACLRule struct {
- IsPermit uint8
- IsIPv6 uint8
- SrcMac []byte `struc:"[6]byte"`
- SrcMacMask []byte `struc:"[6]byte"`
- SrcIPAddr []byte `struc:"[16]byte"`
- SrcIPPrefixLen uint8
+ IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
+ IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
+ SrcMac []byte `binapi:"u8[6],name=src_mac" json:"src_mac,omitempty" struc:"[6]byte"`
+ SrcMacMask []byte `binapi:"u8[6],name=src_mac_mask" json:"src_mac_mask,omitempty" struc:"[6]byte"`
+ SrcIPAddr []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty" struc:"[16]byte"`
+ SrcIPPrefixLen uint8 `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
}
-func (*MacipACLRule) GetTypeName() string {
- return "macip_acl_rule"
-}
-func (*MacipACLRule) GetCrcString() string {
- return "70589f1e"
-}
+func (*MacipACLRule) GetTypeName() string { return "macip_acl_rule" }
// ACLAddReplace represents VPP binary API message 'acl_add_replace'.
type ACLAddReplace struct {
- ACLIndex uint32
- Tag []byte `struc:"[64]byte"`
- Count uint32 `struc:"sizeof=R"`
- R []ACLRule
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
+ R []ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
}
-func (*ACLAddReplace) GetMessageName() string {
- return "acl_add_replace"
-}
-func (*ACLAddReplace) GetCrcString() string {
- return "e839997e"
-}
-func (*ACLAddReplace) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLAddReplace) Reset() { *m = ACLAddReplace{} }
+func (*ACLAddReplace) GetMessageName() string { return "acl_add_replace" }
+func (*ACLAddReplace) GetCrcString() string { return "13bc8539" }
+func (*ACLAddReplace) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLAddReplace) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Tag
+ size += 64
+ // field[1] m.Count
+ size += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var s1 ACLRule
+ _ = s1
+ if j1 < len(m.R) {
+ s1 = m.R[j1]
+ }
+ // field[2] s1.IsPermit
+ size += 1
+ // field[2] s1.IsIPv6
+ size += 1
+ // field[2] s1.SrcIPAddr
+ size += 16
+ // field[2] s1.SrcIPPrefixLen
+ size += 1
+ // field[2] s1.DstIPAddr
+ size += 16
+ // field[2] s1.DstIPPrefixLen
+ size += 1
+ // field[2] s1.Proto
+ size += 1
+ // field[2] s1.SrcportOrIcmptypeFirst
+ size += 2
+ // field[2] s1.SrcportOrIcmptypeLast
+ size += 2
+ // field[2] s1.DstportOrIcmpcodeFirst
+ size += 2
+ // field[2] s1.DstportOrIcmpcodeLast
+ size += 2
+ // field[2] s1.TCPFlagsMask
+ size += 1
+ // field[2] s1.TCPFlagsValue
+ size += 1
+ }
+ return size
+}
+func (m *ACLAddReplace) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Tag
+ for i := 0; i < 64; i++ {
+ var x uint8
+ if i < len(m.Tag) {
+ x = uint8(m.Tag[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.Count
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
+ pos += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var v1 ACLRule
+ if j1 < len(m.R) {
+ v1 = m.R[j1]
+ }
+ // field[2] v1.IsPermit
+ buf[pos] = uint8(v1.IsPermit)
+ pos += 1
+ // field[2] v1.IsIPv6
+ buf[pos] = uint8(v1.IsIPv6)
+ pos += 1
+ // field[2] v1.SrcIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.SrcIPAddr) {
+ x = uint8(v1.SrcIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPPrefixLen
+ buf[pos] = uint8(v1.SrcIPPrefixLen)
+ pos += 1
+ // field[2] v1.DstIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.DstIPAddr) {
+ x = uint8(v1.DstIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.DstIPPrefixLen
+ buf[pos] = uint8(v1.DstIPPrefixLen)
+ pos += 1
+ // field[2] v1.Proto
+ buf[pos] = uint8(v1.Proto)
+ pos += 1
+ // field[2] v1.SrcportOrIcmptypeFirst
+ o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeFirst))
+ pos += 2
+ // field[2] v1.SrcportOrIcmptypeLast
+ o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeLast))
+ pos += 2
+ // field[2] v1.DstportOrIcmpcodeFirst
+ o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeFirst))
+ pos += 2
+ // field[2] v1.DstportOrIcmpcodeLast
+ o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeLast))
+ pos += 2
+ // field[2] v1.TCPFlagsMask
+ buf[pos] = uint8(v1.TCPFlagsMask)
+ pos += 1
+ // field[2] v1.TCPFlagsValue
+ buf[pos] = uint8(v1.TCPFlagsValue)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *ACLAddReplace) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Tag
+ m.Tag = make([]uint8, 64)
+ for i := 0; i < len(m.Tag); i++ {
+ m.Tag[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.Count
+ m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.R
+ m.R = make([]ACLRule, int(m.Count))
+ for j1 := 0; j1 < int(m.Count); j1++ {
+ // field[2] m.R[j1].IsPermit
+ m.R[j1].IsPermit = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].IsIPv6
+ m.R[j1].IsIPv6 = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcIPAddr
+ m.R[j1].SrcIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
+ m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPPrefixLen
+ m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].DstIPAddr
+ m.R[j1].DstIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].DstIPAddr); i++ {
+ m.R[j1].DstIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].DstIPPrefixLen
+ m.R[j1].DstIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].Proto
+ m.R[j1].Proto = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcportOrIcmptypeFirst
+ m.R[j1].SrcportOrIcmptypeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].SrcportOrIcmptypeLast
+ m.R[j1].SrcportOrIcmptypeLast = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].DstportOrIcmpcodeFirst
+ m.R[j1].DstportOrIcmpcodeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].DstportOrIcmpcodeLast
+ m.R[j1].DstportOrIcmpcodeLast = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].TCPFlagsMask
+ m.R[j1].TCPFlagsMask = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].TCPFlagsValue
+ m.R[j1].TCPFlagsValue = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
}
// ACLAddReplaceReply represents VPP binary API message 'acl_add_replace_reply'.
type ACLAddReplaceReply struct {
- ACLIndex uint32
- Retval int32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-func (*ACLAddReplaceReply) GetMessageName() string {
- return "acl_add_replace_reply"
-}
-func (*ACLAddReplaceReply) GetCrcString() string {
- return "ac407b0c"
-}
-func (*ACLAddReplaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *ACLAddReplaceReply) Reset() { *m = ACLAddReplaceReply{} }
+func (*ACLAddReplaceReply) GetMessageName() string { return "acl_add_replace_reply" }
+func (*ACLAddReplaceReply) GetCrcString() string { return "ac407b0c" }
+func (*ACLAddReplaceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLAddReplaceReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *ACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLAddReplaceReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLDel represents VPP binary API message 'acl_del'.
type ACLDel struct {
- ACLIndex uint32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
}
-func (*ACLDel) GetMessageName() string {
- return "acl_del"
-}
-func (*ACLDel) GetCrcString() string {
- return "ef34fea4"
-}
-func (*ACLDel) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLDel) Reset() { *m = ACLDel{} }
+func (*ACLDel) GetMessageName() string { return "acl_del" }
+func (*ACLDel) GetCrcString() string { return "ef34fea4" }
+func (*ACLDel) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ return size
+}
+func (m *ACLDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLDelReply represents VPP binary API message 'acl_del_reply'.
type ACLDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-func (*ACLDelReply) GetMessageName() string {
- return "acl_del_reply"
-}
-func (*ACLDelReply) GetCrcString() string {
- return "e8d4e804"
-}
-func (*ACLDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *ACLDelReply) Reset() { *m = ACLDelReply{} }
+func (*ACLDelReply) GetMessageName() string { return "acl_del_reply" }
+func (*ACLDelReply) GetCrcString() string { return "e8d4e804" }
+func (*ACLDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *ACLDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLDetails represents VPP binary API message 'acl_details'.
type ACLDetails struct {
- ACLIndex uint32
- Tag []byte `struc:"[64]byte"`
- Count uint32 `struc:"sizeof=R"`
- R []ACLRule
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
+ R []ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
}
-func (*ACLDetails) GetMessageName() string {
- return "acl_details"
-}
-func (*ACLDetails) GetCrcString() string {
- return "5bd895be"
-}
-func (*ACLDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *ACLDetails) Reset() { *m = ACLDetails{} }
+func (*ACLDetails) GetMessageName() string { return "acl_details" }
+func (*ACLDetails) GetCrcString() string { return "f89d7a88" }
+func (*ACLDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Tag
+ size += 64
+ // field[1] m.Count
+ size += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var s1 ACLRule
+ _ = s1
+ if j1 < len(m.R) {
+ s1 = m.R[j1]
+ }
+ // field[2] s1.IsPermit
+ size += 1
+ // field[2] s1.IsIPv6
+ size += 1
+ // field[2] s1.SrcIPAddr
+ size += 16
+ // field[2] s1.SrcIPPrefixLen
+ size += 1
+ // field[2] s1.DstIPAddr
+ size += 16
+ // field[2] s1.DstIPPrefixLen
+ size += 1
+ // field[2] s1.Proto
+ size += 1
+ // field[2] s1.SrcportOrIcmptypeFirst
+ size += 2
+ // field[2] s1.SrcportOrIcmptypeLast
+ size += 2
+ // field[2] s1.DstportOrIcmpcodeFirst
+ size += 2
+ // field[2] s1.DstportOrIcmpcodeLast
+ size += 2
+ // field[2] s1.TCPFlagsMask
+ size += 1
+ // field[2] s1.TCPFlagsValue
+ size += 1
+ }
+ return size
+}
+func (m *ACLDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Tag
+ for i := 0; i < 64; i++ {
+ var x uint8
+ if i < len(m.Tag) {
+ x = uint8(m.Tag[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.Count
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
+ pos += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var v1 ACLRule
+ if j1 < len(m.R) {
+ v1 = m.R[j1]
+ }
+ // field[2] v1.IsPermit
+ buf[pos] = uint8(v1.IsPermit)
+ pos += 1
+ // field[2] v1.IsIPv6
+ buf[pos] = uint8(v1.IsIPv6)
+ pos += 1
+ // field[2] v1.SrcIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.SrcIPAddr) {
+ x = uint8(v1.SrcIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPPrefixLen
+ buf[pos] = uint8(v1.SrcIPPrefixLen)
+ pos += 1
+ // field[2] v1.DstIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.DstIPAddr) {
+ x = uint8(v1.DstIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.DstIPPrefixLen
+ buf[pos] = uint8(v1.DstIPPrefixLen)
+ pos += 1
+ // field[2] v1.Proto
+ buf[pos] = uint8(v1.Proto)
+ pos += 1
+ // field[2] v1.SrcportOrIcmptypeFirst
+ o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeFirst))
+ pos += 2
+ // field[2] v1.SrcportOrIcmptypeLast
+ o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeLast))
+ pos += 2
+ // field[2] v1.DstportOrIcmpcodeFirst
+ o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeFirst))
+ pos += 2
+ // field[2] v1.DstportOrIcmpcodeLast
+ o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeLast))
+ pos += 2
+ // field[2] v1.TCPFlagsMask
+ buf[pos] = uint8(v1.TCPFlagsMask)
+ pos += 1
+ // field[2] v1.TCPFlagsValue
+ buf[pos] = uint8(v1.TCPFlagsValue)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *ACLDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Tag
+ m.Tag = make([]uint8, 64)
+ for i := 0; i < len(m.Tag); i++ {
+ m.Tag[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.Count
+ m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.R
+ m.R = make([]ACLRule, int(m.Count))
+ for j1 := 0; j1 < int(m.Count); j1++ {
+ // field[2] m.R[j1].IsPermit
+ m.R[j1].IsPermit = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].IsIPv6
+ m.R[j1].IsIPv6 = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcIPAddr
+ m.R[j1].SrcIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
+ m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPPrefixLen
+ m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].DstIPAddr
+ m.R[j1].DstIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].DstIPAddr); i++ {
+ m.R[j1].DstIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].DstIPPrefixLen
+ m.R[j1].DstIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].Proto
+ m.R[j1].Proto = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcportOrIcmptypeFirst
+ m.R[j1].SrcportOrIcmptypeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].SrcportOrIcmptypeLast
+ m.R[j1].SrcportOrIcmptypeLast = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].DstportOrIcmpcodeFirst
+ m.R[j1].DstportOrIcmpcodeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].DstportOrIcmpcodeLast
+ m.R[j1].DstportOrIcmpcodeLast = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ // field[2] m.R[j1].TCPFlagsMask
+ m.R[j1].TCPFlagsMask = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].TCPFlagsValue
+ m.R[j1].TCPFlagsValue = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
}
// ACLDump represents VPP binary API message 'acl_dump'.
type ACLDump struct {
- ACLIndex uint32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
}
-func (*ACLDump) GetMessageName() string {
- return "acl_dump"
-}
-func (*ACLDump) GetCrcString() string {
- return "ef34fea4"
-}
-func (*ACLDump) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLDump) Reset() { *m = ACLDump{} }
+func (*ACLDump) GetMessageName() string { return "acl_dump" }
+func (*ACLDump) GetCrcString() string { return "ef34fea4" }
+func (*ACLDump) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ return size
+}
+func (m *ACLDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLInterfaceAddDel represents VPP binary API message 'acl_interface_add_del'.
type ACLInterfaceAddDel struct {
- IsAdd uint8
- IsInput uint8
- SwIfIndex uint32
- ACLIndex uint32
+ IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
+ IsInput uint8 `binapi:"u8,name=is_input" json:"is_input,omitempty"`
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
}
-func (*ACLInterfaceAddDel) GetMessageName() string {
- return "acl_interface_add_del"
-}
-func (*ACLInterfaceAddDel) GetCrcString() string {
- return "0b2aedd1"
-}
-func (*ACLInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLInterfaceAddDel) Reset() { *m = ACLInterfaceAddDel{} }
+func (*ACLInterfaceAddDel) GetMessageName() string { return "acl_interface_add_del" }
+func (*ACLInterfaceAddDel) GetCrcString() string { return "0b2aedd1" }
+func (*ACLInterfaceAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLInterfaceAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.IsInput
+ size += 1
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.ACLIndex
+ size += 4
+ return size
+}
+func (m *ACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ buf[pos] = uint8(m.IsAdd)
+ pos += 1
+ // field[1] m.IsInput
+ buf[pos] = uint8(m.IsInput)
+ pos += 1
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLInterfaceAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.IsInput
+ m.IsInput = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLInterfaceAddDelReply represents VPP binary API message 'acl_interface_add_del_reply'.
type ACLInterfaceAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-func (*ACLInterfaceAddDelReply) GetMessageName() string {
- return "acl_interface_add_del_reply"
-}
-func (*ACLInterfaceAddDelReply) GetCrcString() string {
- return "e8d4e804"
-}
-func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *ACLInterfaceAddDelReply) Reset() { *m = ACLInterfaceAddDelReply{} }
+func (*ACLInterfaceAddDelReply) GetMessageName() string { return "acl_interface_add_del_reply" }
+func (*ACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
+func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLInterfaceAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *ACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLInterfaceAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLInterfaceEtypeWhitelistDetails represents VPP binary API message 'acl_interface_etype_whitelist_details'.
type ACLInterfaceEtypeWhitelistDetails struct {
- SwIfIndex uint32
- Count uint8 `struc:"sizeof=Whitelist"`
- NInput uint8
- Whitelist []uint16
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Count uint8 `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Whitelist"`
+ NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
+ Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
}
+func (m *ACLInterfaceEtypeWhitelistDetails) Reset() { *m = ACLInterfaceEtypeWhitelistDetails{} }
func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string {
return "acl_interface_etype_whitelist_details"
}
-func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string {
- return "6a5d4e81"
-}
-func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string { return "6a5d4e81" }
+func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLInterfaceEtypeWhitelistDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Count
+ size += 1
+ // field[1] m.NInput
+ size += 1
+ // field[1] m.Whitelist
+ size += 2 * len(m.Whitelist)
+ return size
+}
+func (m *ACLInterfaceEtypeWhitelistDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Count
+ buf[pos] = uint8(len(m.Whitelist))
+ pos += 1
+ // field[1] m.NInput
+ buf[pos] = uint8(m.NInput)
+ pos += 1
+ // field[1] m.Whitelist
+ for i := 0; i < len(m.Whitelist); i++ {
+ var x uint16
+ if i < len(m.Whitelist) {
+ x = uint16(m.Whitelist[i])
+ }
+ o.PutUint16(buf[pos:pos+2], uint16(x))
+ pos += 2
+ }
+ return buf, nil
+}
+func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Count
+ m.Count = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.NInput
+ m.NInput = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.Whitelist
+ m.Whitelist = make([]uint16, m.Count)
+ for i := 0; i < len(m.Whitelist); i++ {
+ m.Whitelist[i] = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ }
+ return nil
}
// ACLInterfaceEtypeWhitelistDump represents VPP binary API message 'acl_interface_etype_whitelist_dump'.
type ACLInterfaceEtypeWhitelistDump struct {
- SwIfIndex uint32
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
}
+func (m *ACLInterfaceEtypeWhitelistDump) Reset() { *m = ACLInterfaceEtypeWhitelistDump{} }
func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string {
return "acl_interface_etype_whitelist_dump"
}
-func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string {
- return "529cb13f"
-}
-func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string { return "529cb13f" }
+func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLInterfaceEtypeWhitelistDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *ACLInterfaceEtypeWhitelistDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLInterfaceListDetails represents VPP binary API message 'acl_interface_list_details'.
type ACLInterfaceListDetails struct {
- SwIfIndex uint32
- Count uint8 `struc:"sizeof=Acls"`
- NInput uint8
- Acls []uint32
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Count uint8 `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
+ NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
+ Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
}
-func (*ACLInterfaceListDetails) GetMessageName() string {
- return "acl_interface_list_details"
-}
-func (*ACLInterfaceListDetails) GetCrcString() string {
- return "d5e80809"
-}
-func (*ACLInterfaceListDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *ACLInterfaceListDetails) Reset() { *m = ACLInterfaceListDetails{} }
+func (*ACLInterfaceListDetails) GetMessageName() string { return "acl_interface_list_details" }
+func (*ACLInterfaceListDetails) GetCrcString() string { return "d5e80809" }
+func (*ACLInterfaceListDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLInterfaceListDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Count
+ size += 1
+ // field[1] m.NInput
+ size += 1
+ // field[1] m.Acls
+ size += 4 * len(m.Acls)
+ return size
+}
+func (m *ACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Count
+ buf[pos] = uint8(len(m.Acls))
+ pos += 1
+ // field[1] m.NInput
+ buf[pos] = uint8(m.NInput)
+ pos += 1
+ // field[1] m.Acls
+ for i := 0; i < len(m.Acls); i++ {
+ var x uint32
+ if i < len(m.Acls) {
+ x = uint32(m.Acls[i])
+ }
+ o.PutUint32(buf[pos:pos+4], uint32(x))
+ pos += 4
+ }
+ return buf, nil
+}
+func (m *ACLInterfaceListDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Count
+ m.Count = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.NInput
+ m.NInput = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.Acls
+ m.Acls = make([]uint32, m.Count)
+ for i := 0; i < len(m.Acls); i++ {
+ m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ }
+ return nil
}
// ACLInterfaceListDump represents VPP binary API message 'acl_interface_list_dump'.
type ACLInterfaceListDump struct {
- SwIfIndex uint32
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
}
-func (*ACLInterfaceListDump) GetMessageName() string {
- return "acl_interface_list_dump"
-}
-func (*ACLInterfaceListDump) GetCrcString() string {
- return "529cb13f"
-}
-func (*ACLInterfaceListDump) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLInterfaceListDump) Reset() { *m = ACLInterfaceListDump{} }
+func (*ACLInterfaceListDump) GetMessageName() string { return "acl_interface_list_dump" }
+func (*ACLInterfaceListDump) GetCrcString() string { return "529cb13f" }
+func (*ACLInterfaceListDump) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLInterfaceListDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *ACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLInterfaceListDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLInterfaceSetACLList represents VPP binary API message 'acl_interface_set_acl_list'.
type ACLInterfaceSetACLList struct {
- SwIfIndex uint32
- Count uint8 `struc:"sizeof=Acls"`
- NInput uint8
- Acls []uint32
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Count uint8 `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
+ NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
+ Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
}
-func (*ACLInterfaceSetACLList) GetMessageName() string {
- return "acl_interface_set_acl_list"
-}
-func (*ACLInterfaceSetACLList) GetCrcString() string {
- return "8baece38"
-}
-func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLInterfaceSetACLList) Reset() { *m = ACLInterfaceSetACLList{} }
+func (*ACLInterfaceSetACLList) GetMessageName() string { return "acl_interface_set_acl_list" }
+func (*ACLInterfaceSetACLList) GetCrcString() string { return "8baece38" }
+func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLInterfaceSetACLList) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Count
+ size += 1
+ // field[1] m.NInput
+ size += 1
+ // field[1] m.Acls
+ size += 4 * len(m.Acls)
+ return size
+}
+func (m *ACLInterfaceSetACLList) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Count
+ buf[pos] = uint8(len(m.Acls))
+ pos += 1
+ // field[1] m.NInput
+ buf[pos] = uint8(m.NInput)
+ pos += 1
+ // field[1] m.Acls
+ for i := 0; i < len(m.Acls); i++ {
+ var x uint32
+ if i < len(m.Acls) {
+ x = uint32(m.Acls[i])
+ }
+ o.PutUint32(buf[pos:pos+4], uint32(x))
+ pos += 4
+ }
+ return buf, nil
+}
+func (m *ACLInterfaceSetACLList) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Count
+ m.Count = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.NInput
+ m.NInput = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.Acls
+ m.Acls = make([]uint32, m.Count)
+ for i := 0; i < len(m.Acls); i++ {
+ m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ }
+ return nil
}
// ACLInterfaceSetACLListReply represents VPP binary API message 'acl_interface_set_acl_list_reply'.
type ACLInterfaceSetACLListReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
+func (m *ACLInterfaceSetACLListReply) Reset() { *m = ACLInterfaceSetACLListReply{} }
func (*ACLInterfaceSetACLListReply) GetMessageName() string {
return "acl_interface_set_acl_list_reply"
}
-func (*ACLInterfaceSetACLListReply) GetCrcString() string {
- return "e8d4e804"
-}
-func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (*ACLInterfaceSetACLListReply) GetCrcString() string { return "e8d4e804" }
+func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLInterfaceSetACLListReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *ACLInterfaceSetACLListReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLInterfaceSetACLListReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLInterfaceSetEtypeWhitelist represents VPP binary API message 'acl_interface_set_etype_whitelist'.
type ACLInterfaceSetEtypeWhitelist struct {
- SwIfIndex uint32
- Count uint8 `struc:"sizeof=Whitelist"`
- NInput uint8
- Whitelist []uint16
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Count uint8 `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Whitelist"`
+ NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
+ Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
}
+func (m *ACLInterfaceSetEtypeWhitelist) Reset() { *m = ACLInterfaceSetEtypeWhitelist{} }
func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string {
return "acl_interface_set_etype_whitelist"
}
-func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string {
- return "f515efc5"
-}
-func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string { return "f515efc5" }
+func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLInterfaceSetEtypeWhitelist) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Count
+ size += 1
+ // field[1] m.NInput
+ size += 1
+ // field[1] m.Whitelist
+ size += 2 * len(m.Whitelist)
+ return size
+}
+func (m *ACLInterfaceSetEtypeWhitelist) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Count
+ buf[pos] = uint8(len(m.Whitelist))
+ pos += 1
+ // field[1] m.NInput
+ buf[pos] = uint8(m.NInput)
+ pos += 1
+ // field[1] m.Whitelist
+ for i := 0; i < len(m.Whitelist); i++ {
+ var x uint16
+ if i < len(m.Whitelist) {
+ x = uint16(m.Whitelist[i])
+ }
+ o.PutUint16(buf[pos:pos+2], uint16(x))
+ pos += 2
+ }
+ return buf, nil
+}
+func (m *ACLInterfaceSetEtypeWhitelist) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Count
+ m.Count = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.NInput
+ m.NInput = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.Whitelist
+ m.Whitelist = make([]uint16, m.Count)
+ for i := 0; i < len(m.Whitelist); i++ {
+ m.Whitelist[i] = uint16(o.Uint16(tmp[pos : pos+2]))
+ pos += 2
+ }
+ return nil
}
// ACLInterfaceSetEtypeWhitelistReply represents VPP binary API message 'acl_interface_set_etype_whitelist_reply'.
type ACLInterfaceSetEtypeWhitelistReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
+func (m *ACLInterfaceSetEtypeWhitelistReply) Reset() { *m = ACLInterfaceSetEtypeWhitelistReply{} }
func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string {
return "acl_interface_set_etype_whitelist_reply"
}
-func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string {
- return "e8d4e804"
-}
-func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string { return "e8d4e804" }
+func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLInterfaceSetEtypeWhitelistReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *ACLInterfaceSetEtypeWhitelistReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLPluginControlPing represents VPP binary API message 'acl_plugin_control_ping'.
type ACLPluginControlPing struct{}
-func (*ACLPluginControlPing) GetMessageName() string {
- return "acl_plugin_control_ping"
-}
-func (*ACLPluginControlPing) GetCrcString() string {
- return "51077d14"
+func (m *ACLPluginControlPing) Reset() { *m = ACLPluginControlPing{} }
+func (*ACLPluginControlPing) GetMessageName() string { return "acl_plugin_control_ping" }
+func (*ACLPluginControlPing) GetCrcString() string { return "51077d14" }
+func (*ACLPluginControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLPluginControlPing) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *ACLPluginControlPing) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
}
-func (*ACLPluginControlPing) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLPluginControlPing) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
}
// ACLPluginControlPingReply represents VPP binary API message 'acl_plugin_control_ping_reply'.
type ACLPluginControlPingReply struct {
- Retval int32
- ClientIndex uint32
- VpePID uint32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
+ VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
}
-func (*ACLPluginControlPingReply) GetMessageName() string {
- return "acl_plugin_control_ping_reply"
-}
-func (*ACLPluginControlPingReply) GetCrcString() string {
- return "f6b0b8ca"
-}
-func (*ACLPluginControlPingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *ACLPluginControlPingReply) Reset() { *m = ACLPluginControlPingReply{} }
+func (*ACLPluginControlPingReply) GetMessageName() string { return "acl_plugin_control_ping_reply" }
+func (*ACLPluginControlPingReply) GetCrcString() string { return "f6b0b8ca" }
+func (*ACLPluginControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLPluginControlPingReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ // field[1] m.ClientIndex
+ size += 4
+ // field[1] m.VpePID
+ size += 4
+ return size
+}
+func (m *ACLPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ // field[1] m.ClientIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ClientIndex))
+ pos += 4
+ // field[1] m.VpePID
+ o.PutUint32(buf[pos:pos+4], uint32(m.VpePID))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLPluginControlPingReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.ClientIndex
+ m.ClientIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.VpePID
+ m.VpePID = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// ACLPluginGetConnTableMaxEntries represents VPP binary API message 'acl_plugin_get_conn_table_max_entries'.
type ACLPluginGetConnTableMaxEntries struct{}
+func (m *ACLPluginGetConnTableMaxEntries) Reset() { *m = ACLPluginGetConnTableMaxEntries{} }
func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string {
return "acl_plugin_get_conn_table_max_entries"
}
-func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string {
- return "51077d14"
+func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string { return "51077d14" }
+func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLPluginGetConnTableMaxEntries) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *ACLPluginGetConnTableMaxEntries) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
}
-func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
}
// ACLPluginGetConnTableMaxEntriesReply represents VPP binary API message 'acl_plugin_get_conn_table_max_entries_reply'.
type ACLPluginGetConnTableMaxEntriesReply struct {
- ConnTableMaxEntries uint64
+ ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"`
}
+func (m *ACLPluginGetConnTableMaxEntriesReply) Reset() { *m = ACLPluginGetConnTableMaxEntriesReply{} }
func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageName() string {
return "acl_plugin_get_conn_table_max_entries_reply"
}
-func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string {
- return "7a096d3d"
-}
+func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string { return "7a096d3d" }
func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
+func (m *ACLPluginGetConnTableMaxEntriesReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ConnTableMaxEntries
+ size += 8
+ return size
+}
+func (m *ACLPluginGetConnTableMaxEntriesReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ConnTableMaxEntries
+ o.PutUint64(buf[pos:pos+8], uint64(m.ConnTableMaxEntries))
+ pos += 8
+ return buf, nil
+}
+func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ConnTableMaxEntries
+ m.ConnTableMaxEntries = uint64(o.Uint64(tmp[pos : pos+8]))
+ pos += 8
+ return nil
+}
+
// ACLPluginGetVersion represents VPP binary API message 'acl_plugin_get_version'.
type ACLPluginGetVersion struct{}
-func (*ACLPluginGetVersion) GetMessageName() string {
- return "acl_plugin_get_version"
-}
-func (*ACLPluginGetVersion) GetCrcString() string {
- return "51077d14"
+func (m *ACLPluginGetVersion) Reset() { *m = ACLPluginGetVersion{} }
+func (*ACLPluginGetVersion) GetMessageName() string { return "acl_plugin_get_version" }
+func (*ACLPluginGetVersion) GetCrcString() string { return "51077d14" }
+func (*ACLPluginGetVersion) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLPluginGetVersion) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *ACLPluginGetVersion) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
}
-func (*ACLPluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *ACLPluginGetVersion) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
}
// ACLPluginGetVersionReply represents VPP binary API message 'acl_plugin_get_version_reply'.
type ACLPluginGetVersionReply struct {
- Major uint32
- Minor uint32
+ Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
+ Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
}
-func (*ACLPluginGetVersionReply) GetMessageName() string {
- return "acl_plugin_get_version_reply"
+func (m *ACLPluginGetVersionReply) Reset() { *m = ACLPluginGetVersionReply{} }
+func (*ACLPluginGetVersionReply) GetMessageName() string { return "acl_plugin_get_version_reply" }
+func (*ACLPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
+func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *ACLPluginGetVersionReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Major
+ size += 4
+ // field[1] m.Minor
+ size += 4
+ return size
+}
+func (m *ACLPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Major
+ o.PutUint32(buf[pos:pos+4], uint32(m.Major))
+ pos += 4
+ // field[1] m.Minor
+ o.PutUint32(buf[pos:pos+4], uint32(m.Minor))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLPluginGetVersionReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Major
+ m.Major = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Minor
+ m.Minor = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
+// ACLStatsIntfCountersEnable represents VPP binary API message 'acl_stats_intf_counters_enable'.
+type ACLStatsIntfCountersEnable struct {
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
+}
+
+func (m *ACLStatsIntfCountersEnable) Reset() { *m = ACLStatsIntfCountersEnable{} }
+func (*ACLStatsIntfCountersEnable) GetMessageName() string { return "acl_stats_intf_counters_enable" }
+func (*ACLStatsIntfCountersEnable) GetCrcString() string { return "b3e225d2" }
+func (*ACLStatsIntfCountersEnable) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *ACLStatsIntfCountersEnable) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Enable
+ size += 1
+ return size
+}
+func (m *ACLStatsIntfCountersEnable) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Enable
+ if m.Enable {
+ buf[pos] = 1
+ }
+ pos += 1
+ return buf, nil
}
-func (*ACLPluginGetVersionReply) GetCrcString() string {
- return "9b32cf86"
+func (m *ACLStatsIntfCountersEnable) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Enable
+ m.Enable = tmp[pos] != 0
+ pos += 1
+ return nil
}
-func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+
+// ACLStatsIntfCountersEnableReply represents VPP binary API message 'acl_stats_intf_counters_enable_reply'.
+type ACLStatsIntfCountersEnableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-// MacipACLAdd represents VPP binary API message 'macip_acl_add'.
-type MacipACLAdd struct {
- Tag []byte `struc:"[64]byte"`
- Count uint32 `struc:"sizeof=R"`
- R []MacipACLRule
+func (m *ACLStatsIntfCountersEnableReply) Reset() { *m = ACLStatsIntfCountersEnableReply{} }
+func (*ACLStatsIntfCountersEnableReply) GetMessageName() string {
+ return "acl_stats_intf_counters_enable_reply"
}
+func (*ACLStatsIntfCountersEnableReply) GetCrcString() string { return "e8d4e804" }
+func (*ACLStatsIntfCountersEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
-func (*MacipACLAdd) GetMessageName() string {
- return "macip_acl_add"
+func (m *ACLStatsIntfCountersEnableReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *ACLStatsIntfCountersEnableReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *ACLStatsIntfCountersEnableReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
-func (*MacipACLAdd) GetCrcString() string {
- return "b3d3d65a"
+
+// MacipACLAdd represents VPP binary API message 'macip_acl_add'.
+type MacipACLAdd struct {
+ Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
+ R []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
}
-func (*MacipACLAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
+
+func (m *MacipACLAdd) Reset() { *m = MacipACLAdd{} }
+func (*MacipACLAdd) GetMessageName() string { return "macip_acl_add" }
+func (*MacipACLAdd) GetCrcString() string { return "0c680ca5" }
+func (*MacipACLAdd) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *MacipACLAdd) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Tag
+ size += 64
+ // field[1] m.Count
+ size += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var s1 MacipACLRule
+ _ = s1
+ if j1 < len(m.R) {
+ s1 = m.R[j1]
+ }
+ // field[2] s1.IsPermit
+ size += 1
+ // field[2] s1.IsIPv6
+ size += 1
+ // field[2] s1.SrcMac
+ size += 6
+ // field[2] s1.SrcMacMask
+ size += 6
+ // field[2] s1.SrcIPAddr
+ size += 16
+ // field[2] s1.SrcIPPrefixLen
+ size += 1
+ }
+ return size
+}
+func (m *MacipACLAdd) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Tag
+ for i := 0; i < 64; i++ {
+ var x uint8
+ if i < len(m.Tag) {
+ x = uint8(m.Tag[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.Count
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
+ pos += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var v1 MacipACLRule
+ if j1 < len(m.R) {
+ v1 = m.R[j1]
+ }
+ // field[2] v1.IsPermit
+ buf[pos] = uint8(v1.IsPermit)
+ pos += 1
+ // field[2] v1.IsIPv6
+ buf[pos] = uint8(v1.IsIPv6)
+ pos += 1
+ // field[2] v1.SrcMac
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(v1.SrcMac) {
+ x = uint8(v1.SrcMac[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcMacMask
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(v1.SrcMacMask) {
+ x = uint8(v1.SrcMacMask[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.SrcIPAddr) {
+ x = uint8(v1.SrcIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPPrefixLen
+ buf[pos] = uint8(v1.SrcIPPrefixLen)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *MacipACLAdd) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Tag
+ m.Tag = make([]uint8, 64)
+ for i := 0; i < len(m.Tag); i++ {
+ m.Tag[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.Count
+ m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.R
+ m.R = make([]MacipACLRule, int(m.Count))
+ for j1 := 0; j1 < int(m.Count); j1++ {
+ // field[2] m.R[j1].IsPermit
+ m.R[j1].IsPermit = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].IsIPv6
+ m.R[j1].IsIPv6 = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcMac
+ m.R[j1].SrcMac = make([]uint8, 6)
+ for i := 0; i < len(m.R[j1].SrcMac); i++ {
+ m.R[j1].SrcMac[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcMacMask
+ m.R[j1].SrcMacMask = make([]uint8, 6)
+ for i := 0; i < len(m.R[j1].SrcMacMask); i++ {
+ m.R[j1].SrcMacMask[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPAddr
+ m.R[j1].SrcIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
+ m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPPrefixLen
+ m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
}
// MacipACLAddReplace represents VPP binary API message 'macip_acl_add_replace'.
type MacipACLAddReplace struct {
- ACLIndex uint32
- Tag []byte `struc:"[64]byte"`
- Count uint32 `struc:"sizeof=R"`
- R []MacipACLRule
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
+ R []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
}
-func (*MacipACLAddReplace) GetMessageName() string {
- return "macip_acl_add_replace"
-}
-func (*MacipACLAddReplace) GetCrcString() string {
- return "a0e8c01b"
-}
-func (*MacipACLAddReplace) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *MacipACLAddReplace) Reset() { *m = MacipACLAddReplace{} }
+func (*MacipACLAddReplace) GetMessageName() string { return "macip_acl_add_replace" }
+func (*MacipACLAddReplace) GetCrcString() string { return "d3d313e7" }
+func (*MacipACLAddReplace) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *MacipACLAddReplace) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Tag
+ size += 64
+ // field[1] m.Count
+ size += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var s1 MacipACLRule
+ _ = s1
+ if j1 < len(m.R) {
+ s1 = m.R[j1]
+ }
+ // field[2] s1.IsPermit
+ size += 1
+ // field[2] s1.IsIPv6
+ size += 1
+ // field[2] s1.SrcMac
+ size += 6
+ // field[2] s1.SrcMacMask
+ size += 6
+ // field[2] s1.SrcIPAddr
+ size += 16
+ // field[2] s1.SrcIPPrefixLen
+ size += 1
+ }
+ return size
+}
+func (m *MacipACLAddReplace) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Tag
+ for i := 0; i < 64; i++ {
+ var x uint8
+ if i < len(m.Tag) {
+ x = uint8(m.Tag[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.Count
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
+ pos += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var v1 MacipACLRule
+ if j1 < len(m.R) {
+ v1 = m.R[j1]
+ }
+ // field[2] v1.IsPermit
+ buf[pos] = uint8(v1.IsPermit)
+ pos += 1
+ // field[2] v1.IsIPv6
+ buf[pos] = uint8(v1.IsIPv6)
+ pos += 1
+ // field[2] v1.SrcMac
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(v1.SrcMac) {
+ x = uint8(v1.SrcMac[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcMacMask
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(v1.SrcMacMask) {
+ x = uint8(v1.SrcMacMask[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.SrcIPAddr) {
+ x = uint8(v1.SrcIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPPrefixLen
+ buf[pos] = uint8(v1.SrcIPPrefixLen)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *MacipACLAddReplace) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Tag
+ m.Tag = make([]uint8, 64)
+ for i := 0; i < len(m.Tag); i++ {
+ m.Tag[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.Count
+ m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.R
+ m.R = make([]MacipACLRule, int(m.Count))
+ for j1 := 0; j1 < int(m.Count); j1++ {
+ // field[2] m.R[j1].IsPermit
+ m.R[j1].IsPermit = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].IsIPv6
+ m.R[j1].IsIPv6 = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcMac
+ m.R[j1].SrcMac = make([]uint8, 6)
+ for i := 0; i < len(m.R[j1].SrcMac); i++ {
+ m.R[j1].SrcMac[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcMacMask
+ m.R[j1].SrcMacMask = make([]uint8, 6)
+ for i := 0; i < len(m.R[j1].SrcMacMask); i++ {
+ m.R[j1].SrcMacMask[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPAddr
+ m.R[j1].SrcIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
+ m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPPrefixLen
+ m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
}
// MacipACLAddReplaceReply represents VPP binary API message 'macip_acl_add_replace_reply'.
type MacipACLAddReplaceReply struct {
- ACLIndex uint32
- Retval int32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-func (*MacipACLAddReplaceReply) GetMessageName() string {
- return "macip_acl_add_replace_reply"
-}
-func (*MacipACLAddReplaceReply) GetCrcString() string {
- return "ac407b0c"
-}
-func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *MacipACLAddReplaceReply) Reset() { *m = MacipACLAddReplaceReply{} }
+func (*MacipACLAddReplaceReply) GetMessageName() string { return "macip_acl_add_replace_reply" }
+func (*MacipACLAddReplaceReply) GetCrcString() string { return "ac407b0c" }
+func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLAddReplaceReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *MacipACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLAddReplaceReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLAddReply represents VPP binary API message 'macip_acl_add_reply'.
type MacipACLAddReply struct {
- ACLIndex uint32
- Retval int32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-func (*MacipACLAddReply) GetMessageName() string {
- return "macip_acl_add_reply"
-}
-func (*MacipACLAddReply) GetCrcString() string {
- return "ac407b0c"
-}
-func (*MacipACLAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *MacipACLAddReply) Reset() { *m = MacipACLAddReply{} }
+func (*MacipACLAddReply) GetMessageName() string { return "macip_acl_add_reply" }
+func (*MacipACLAddReply) GetCrcString() string { return "ac407b0c" }
+func (*MacipACLAddReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLAddReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *MacipACLAddReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLAddReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLDel represents VPP binary API message 'macip_acl_del'.
type MacipACLDel struct {
- ACLIndex uint32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
}
-func (*MacipACLDel) GetMessageName() string {
- return "macip_acl_del"
-}
-func (*MacipACLDel) GetCrcString() string {
- return "ef34fea4"
-}
-func (*MacipACLDel) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *MacipACLDel) Reset() { *m = MacipACLDel{} }
+func (*MacipACLDel) GetMessageName() string { return "macip_acl_del" }
+func (*MacipACLDel) GetCrcString() string { return "ef34fea4" }
+func (*MacipACLDel) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *MacipACLDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ return size
+}
+func (m *MacipACLDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLDelReply represents VPP binary API message 'macip_acl_del_reply'.
type MacipACLDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
-func (*MacipACLDelReply) GetMessageName() string {
- return "macip_acl_del_reply"
-}
-func (*MacipACLDelReply) GetCrcString() string {
- return "e8d4e804"
-}
-func (*MacipACLDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *MacipACLDelReply) Reset() { *m = MacipACLDelReply{} }
+func (*MacipACLDelReply) GetMessageName() string { return "macip_acl_del_reply" }
+func (*MacipACLDelReply) GetCrcString() string { return "e8d4e804" }
+func (*MacipACLDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *MacipACLDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLDetails represents VPP binary API message 'macip_acl_details'.
type MacipACLDetails struct {
- ACLIndex uint32
- Tag []byte `struc:"[64]byte"`
- Count uint32 `struc:"sizeof=R"`
- R []MacipACLRule
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
+ Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
+ R []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
}
-func (*MacipACLDetails) GetMessageName() string {
- return "macip_acl_details"
-}
-func (*MacipACLDetails) GetCrcString() string {
- return "dd2b55ba"
-}
-func (*MacipACLDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *MacipACLDetails) Reset() { *m = MacipACLDetails{} }
+func (*MacipACLDetails) GetMessageName() string { return "macip_acl_details" }
+func (*MacipACLDetails) GetCrcString() string { return "e164e69a" }
+func (*MacipACLDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ // field[1] m.Tag
+ size += 64
+ // field[1] m.Count
+ size += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var s1 MacipACLRule
+ _ = s1
+ if j1 < len(m.R) {
+ s1 = m.R[j1]
+ }
+ // field[2] s1.IsPermit
+ size += 1
+ // field[2] s1.IsIPv6
+ size += 1
+ // field[2] s1.SrcMac
+ size += 6
+ // field[2] s1.SrcMacMask
+ size += 6
+ // field[2] s1.SrcIPAddr
+ size += 16
+ // field[2] s1.SrcIPPrefixLen
+ size += 1
+ }
+ return size
+}
+func (m *MacipACLDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ // field[1] m.Tag
+ for i := 0; i < 64; i++ {
+ var x uint8
+ if i < len(m.Tag) {
+ x = uint8(m.Tag[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[1] m.Count
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
+ pos += 4
+ // field[1] m.R
+ for j1 := 0; j1 < len(m.R); j1++ {
+ var v1 MacipACLRule
+ if j1 < len(m.R) {
+ v1 = m.R[j1]
+ }
+ // field[2] v1.IsPermit
+ buf[pos] = uint8(v1.IsPermit)
+ pos += 1
+ // field[2] v1.IsIPv6
+ buf[pos] = uint8(v1.IsIPv6)
+ pos += 1
+ // field[2] v1.SrcMac
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(v1.SrcMac) {
+ x = uint8(v1.SrcMac[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcMacMask
+ for i := 0; i < 6; i++ {
+ var x uint8
+ if i < len(v1.SrcMacMask) {
+ x = uint8(v1.SrcMacMask[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPAddr
+ for i := 0; i < 16; i++ {
+ var x uint8
+ if i < len(v1.SrcIPAddr) {
+ x = uint8(v1.SrcIPAddr[i])
+ }
+ buf[pos] = uint8(x)
+ pos += 1
+ }
+ // field[2] v1.SrcIPPrefixLen
+ buf[pos] = uint8(v1.SrcIPPrefixLen)
+ pos += 1
+ }
+ return buf, nil
+}
+func (m *MacipACLDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Tag
+ m.Tag = make([]uint8, 64)
+ for i := 0; i < len(m.Tag); i++ {
+ m.Tag[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[1] m.Count
+ m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.R
+ m.R = make([]MacipACLRule, int(m.Count))
+ for j1 := 0; j1 < int(m.Count); j1++ {
+ // field[2] m.R[j1].IsPermit
+ m.R[j1].IsPermit = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].IsIPv6
+ m.R[j1].IsIPv6 = uint8(tmp[pos])
+ pos += 1
+ // field[2] m.R[j1].SrcMac
+ m.R[j1].SrcMac = make([]uint8, 6)
+ for i := 0; i < len(m.R[j1].SrcMac); i++ {
+ m.R[j1].SrcMac[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcMacMask
+ m.R[j1].SrcMacMask = make([]uint8, 6)
+ for i := 0; i < len(m.R[j1].SrcMacMask); i++ {
+ m.R[j1].SrcMacMask[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPAddr
+ m.R[j1].SrcIPAddr = make([]uint8, 16)
+ for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
+ m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
+ pos += 1
+ }
+ // field[2] m.R[j1].SrcIPPrefixLen
+ m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
+ pos += 1
+ }
+ return nil
}
// MacipACLDump represents VPP binary API message 'macip_acl_dump'.
type MacipACLDump struct {
- ACLIndex uint32
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
}
-func (*MacipACLDump) GetMessageName() string {
- return "macip_acl_dump"
-}
-func (*MacipACLDump) GetCrcString() string {
- return "ef34fea4"
-}
-func (*MacipACLDump) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *MacipACLDump) Reset() { *m = MacipACLDump{} }
+func (*MacipACLDump) GetMessageName() string { return "macip_acl_dump" }
+func (*MacipACLDump) GetCrcString() string { return "ef34fea4" }
+func (*MacipACLDump) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *MacipACLDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.ACLIndex
+ size += 4
+ return size
+}
+func (m *MacipACLDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLInterfaceAddDel represents VPP binary API message 'macip_acl_interface_add_del'.
type MacipACLInterfaceAddDel struct {
- IsAdd uint8
- SwIfIndex uint32
- ACLIndex uint32
+ IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
}
-func (*MacipACLInterfaceAddDel) GetMessageName() string {
- return "macip_acl_interface_add_del"
-}
-func (*MacipACLInterfaceAddDel) GetCrcString() string {
- return "6a6be97c"
-}
-func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *MacipACLInterfaceAddDel) Reset() { *m = MacipACLInterfaceAddDel{} }
+func (*MacipACLInterfaceAddDel) GetMessageName() string { return "macip_acl_interface_add_del" }
+func (*MacipACLInterfaceAddDel) GetCrcString() string { return "6a6be97c" }
+func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *MacipACLInterfaceAddDel) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.IsAdd
+ size += 1
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.ACLIndex
+ size += 4
+ return size
+}
+func (m *MacipACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.IsAdd
+ buf[pos] = uint8(m.IsAdd)
+ pos += 1
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.ACLIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLInterfaceAddDel) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.IsAdd
+ m.IsAdd = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.ACLIndex
+ m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLInterfaceAddDelReply represents VPP binary API message 'macip_acl_interface_add_del_reply'.
type MacipACLInterfaceAddDelReply struct {
- Retval int32
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
+func (m *MacipACLInterfaceAddDelReply) Reset() { *m = MacipACLInterfaceAddDelReply{} }
func (*MacipACLInterfaceAddDelReply) GetMessageName() string {
return "macip_acl_interface_add_del_reply"
}
-func (*MacipACLInterfaceAddDelReply) GetCrcString() string {
- return "e8d4e804"
-}
-func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (*MacipACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
+func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLInterfaceAddDelReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Retval
+ size += 4
+ return size
+}
+func (m *MacipACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Retval
+ o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLInterfaceAddDelReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Retval
+ m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
}
// MacipACLInterfaceGet represents VPP binary API message 'macip_acl_interface_get'.
type MacipACLInterfaceGet struct{}
-func (*MacipACLInterfaceGet) GetMessageName() string {
- return "macip_acl_interface_get"
-}
-func (*MacipACLInterfaceGet) GetCrcString() string {
- return "51077d14"
+func (m *MacipACLInterfaceGet) Reset() { *m = MacipACLInterfaceGet{} }
+func (*MacipACLInterfaceGet) GetMessageName() string { return "macip_acl_interface_get" }
+func (*MacipACLInterfaceGet) GetCrcString() string { return "51077d14" }
+func (*MacipACLInterfaceGet) GetMessageType() api.MessageType { return api.RequestMessage }
+
+func (m *MacipACLInterfaceGet) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ return size
+}
+func (m *MacipACLInterfaceGet) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ return buf, nil
}
-func (*MacipACLInterfaceGet) GetMessageType() api.MessageType {
- return api.RequestMessage
+func (m *MacipACLInterfaceGet) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ return nil
}
// MacipACLInterfaceGetReply represents VPP binary API message 'macip_acl_interface_get_reply'.
type MacipACLInterfaceGetReply struct {
- Count uint32 `struc:"sizeof=Acls"`
- Acls []uint32
+ Count uint32 `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
+ Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
}
-func (*MacipACLInterfaceGetReply) GetMessageName() string {
- return "macip_acl_interface_get_reply"
-}
-func (*MacipACLInterfaceGetReply) GetCrcString() string {
- return "accf9b05"
-}
-func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (m *MacipACLInterfaceGetReply) Reset() { *m = MacipACLInterfaceGetReply{} }
+func (*MacipACLInterfaceGetReply) GetMessageName() string { return "macip_acl_interface_get_reply" }
+func (*MacipACLInterfaceGetReply) GetCrcString() string { return "accf9b05" }
+func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLInterfaceGetReply) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.Count
+ size += 4
+ // field[1] m.Acls
+ size += 4 * len(m.Acls)
+ return size
+}
+func (m *MacipACLInterfaceGetReply) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.Count
+ o.PutUint32(buf[pos:pos+4], uint32(len(m.Acls)))
+ pos += 4
+ // field[1] m.Acls
+ for i := 0; i < len(m.Acls); i++ {
+ var x uint32
+ if i < len(m.Acls) {
+ x = uint32(m.Acls[i])
+ }
+ o.PutUint32(buf[pos:pos+4], uint32(x))
+ pos += 4
+ }
+ return buf, nil
+}
+func (m *MacipACLInterfaceGetReply) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.Count
+ m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Acls
+ m.Acls = make([]uint32, m.Count)
+ for i := 0; i < len(m.Acls); i++ {
+ m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ }
+ return nil
}
// MacipACLInterfaceListDetails represents VPP binary API message 'macip_acl_interface_list_details'.
type MacipACLInterfaceListDetails struct {
- SwIfIndex uint32
- Count uint8 `struc:"sizeof=Acls"`
- Acls []uint32
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Count uint8 `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
+ Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
}
+func (m *MacipACLInterfaceListDetails) Reset() { *m = MacipACLInterfaceListDetails{} }
func (*MacipACLInterfaceListDetails) GetMessageName() string {
return "macip_acl_interface_list_details"
}
-func (*MacipACLInterfaceListDetails) GetCrcString() string {
- return "29783fa0"
-}
-func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
+func (*MacipACLInterfaceListDetails) GetCrcString() string { return "29783fa0" }
+func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
+
+func (m *MacipACLInterfaceListDetails) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ // field[1] m.Count
+ size += 1
+ // field[1] m.Acls
+ size += 4 * len(m.Acls)
+ return size
+}
+func (m *MacipACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ // field[1] m.Count
+ buf[pos] = uint8(len(m.Acls))
+ pos += 1
+ // field[1] m.Acls
+ for i := 0; i < len(m.Acls); i++ {
+ var x uint32
+ if i < len(m.Acls) {
+ x = uint32(m.Acls[i])
+ }
+ o.PutUint32(buf[pos:pos+4], uint32(x))
+ pos += 4
+ }
+ return buf, nil
+}
+func (m *MacipACLInterfaceListDetails) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ // field[1] m.Count
+ m.Count = uint8(tmp[pos])
+ pos += 1
+ // field[1] m.Acls
+ m.Acls = make([]uint32, m.Count)
+ for i := 0; i < len(m.Acls); i++ {
+ m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ }
+ return nil
}
// MacipACLInterfaceListDump represents VPP binary API message 'macip_acl_interface_list_dump'.
type MacipACLInterfaceListDump struct {
- SwIfIndex uint32
+ SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
}
-func (*MacipACLInterfaceListDump) GetMessageName() string {
- return "macip_acl_interface_list_dump"
-}
-func (*MacipACLInterfaceListDump) GetCrcString() string {
- return "529cb13f"
-}
-func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
+func (m *MacipACLInterfaceListDump) Reset() { *m = MacipACLInterfaceListDump{} }
+func (*MacipACLInterfaceListDump) GetMessageName() string { return "macip_acl_interface_list_dump" }
+func (*MacipACLInterfaceListDump) GetCrcString() string { return "529cb13f" }
+func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType { return api.RequestMessage }
-func init() {
+func (m *MacipACLInterfaceListDump) Size() int {
+ if m == nil {
+ return 0
+ }
+ var size int
+ // field[1] m.SwIfIndex
+ size += 4
+ return size
+}
+func (m *MacipACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ var buf []byte
+ if b == nil {
+ buf = make([]byte, m.Size())
+ } else {
+ buf = b
+ }
+ // field[1] m.SwIfIndex
+ o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
+ pos += 4
+ return buf, nil
+}
+func (m *MacipACLInterfaceListDump) Unmarshal(tmp []byte) error {
+ o := binary.BigEndian
+ _ = o
+ pos := 0
+ _ = pos
+ // field[1] m.SwIfIndex
+ m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
+ pos += 4
+ return nil
+}
+
+func init() { file_acl_binapi_init() }
+func file_acl_binapi_init() {
api.RegisterMessage((*ACLAddReplace)(nil), "acl.ACLAddReplace")
api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl.ACLAddReplaceReply")
api.RegisterMessage((*ACLDel)(nil), "acl.ACLDel")
@@ -665,6 +2811,8 @@ func init() {
api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl.ACLPluginGetConnTableMaxEntriesReply")
api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl.ACLPluginGetVersion")
api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl.ACLPluginGetVersionReply")
+ api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl.ACLStatsIntfCountersEnable")
+ api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl.ACLStatsIntfCountersEnableReply")
api.RegisterMessage((*MacipACLAdd)(nil), "acl.MacipACLAdd")
api.RegisterMessage((*MacipACLAddReplace)(nil), "acl.MacipACLAddReplace")
api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "acl.MacipACLAddReplaceReply")
@@ -706,6 +2854,8 @@ func AllMessages() []api.Message {
(*ACLPluginGetConnTableMaxEntriesReply)(nil),
(*ACLPluginGetVersion)(nil),
(*ACLPluginGetVersionReply)(nil),
+ (*ACLStatsIntfCountersEnable)(nil),
+ (*ACLStatsIntfCountersEnableReply)(nil),
(*MacipACLAdd)(nil),
(*MacipACLAddReplace)(nil),
(*MacipACLAddReplaceReply)(nil),
@@ -723,293 +2873,13 @@ func AllMessages() []api.Message {
}
}
-// RPCService represents RPC service API for acl module.
-type RPCService interface {
- DumpACL(ctx context.Context, in *ACLDump) (RPCService_DumpACLClient, error)
- DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_DumpACLInterfaceEtypeWhitelistClient, error)
- DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) (RPCService_DumpACLInterfaceListClient, error)
- DumpMacipACL(ctx context.Context, in *MacipACLDump) (RPCService_DumpMacipACLClient, error)
- DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_DumpMacipACLInterfaceListClient, error)
- ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
- ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
- ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error)
- ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error)
- ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error)
- ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error)
- ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error)
- ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error)
- MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error)
- MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error)
- MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error)
- MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error)
- MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error)
-}
-
-type serviceClient struct {
- ch api.Channel
-}
-
-func NewServiceClient(ch api.Channel) RPCService {
- return &serviceClient{ch}
-}
-
-func (c *serviceClient) DumpACL(ctx context.Context, in *ACLDump) (RPCService_DumpACLClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpACLClient{stream}
- return x, nil
-}
-
-type RPCService_DumpACLClient interface {
- Recv() (*ACLDetails, error)
-}
-
-type serviceClient_DumpACLClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpACLClient) Recv() (*ACLDetails, error) {
- m := new(ACLDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpACLInterfaceEtypeWhitelist(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_DumpACLInterfaceEtypeWhitelistClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpACLInterfaceEtypeWhitelistClient{stream}
- return x, nil
-}
-
-type RPCService_DumpACLInterfaceEtypeWhitelistClient interface {
- Recv() (*ACLInterfaceEtypeWhitelistDetails, error)
-}
-
-type serviceClient_DumpACLInterfaceEtypeWhitelistClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpACLInterfaceEtypeWhitelistClient) Recv() (*ACLInterfaceEtypeWhitelistDetails, error) {
- m := new(ACLInterfaceEtypeWhitelistDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpACLInterfaceList(ctx context.Context, in *ACLInterfaceListDump) (RPCService_DumpACLInterfaceListClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpACLInterfaceListClient{stream}
- return x, nil
-}
-
-type RPCService_DumpACLInterfaceListClient interface {
- Recv() (*ACLInterfaceListDetails, error)
-}
-
-type serviceClient_DumpACLInterfaceListClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpACLInterfaceListClient) Recv() (*ACLInterfaceListDetails, error) {
- m := new(ACLInterfaceListDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpMacipACL(ctx context.Context, in *MacipACLDump) (RPCService_DumpMacipACLClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpMacipACLClient{stream}
- return x, nil
-}
-
-type RPCService_DumpMacipACLClient interface {
- Recv() (*MacipACLDetails, error)
-}
-
-type serviceClient_DumpMacipACLClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpMacipACLClient) Recv() (*MacipACLDetails, error) {
- m := new(MacipACLDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) DumpMacipACLInterfaceList(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_DumpMacipACLInterfaceListClient, error) {
- stream := c.ch.SendMultiRequest(in)
- x := &serviceClient_DumpMacipACLInterfaceListClient{stream}
- return x, nil
-}
-
-type RPCService_DumpMacipACLInterfaceListClient interface {
- Recv() (*MacipACLInterfaceListDetails, error)
-}
-
-type serviceClient_DumpMacipACLInterfaceListClient struct {
- api.MultiRequestCtx
-}
-
-func (c *serviceClient_DumpMacipACLInterfaceListClient) Recv() (*MacipACLInterfaceListDetails, error) {
- m := new(MacipACLInterfaceListDetails)
- stop, err := c.MultiRequestCtx.ReceiveReply(m)
- if err != nil {
- return nil, err
- }
- if stop {
- return nil, io.EOF
- }
- return m, nil
-}
-
-func (c *serviceClient) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
- out := new(ACLAddReplaceReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
- out := new(ACLDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
- out := new(ACLInterfaceAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
- out := new(ACLInterfaceSetACLListReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
- out := new(ACLInterfaceSetEtypeWhitelistReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
- out := new(ACLPluginControlPingReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
- out := new(ACLPluginGetConnTableMaxEntriesReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
- out := new(ACLPluginGetVersionReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
- out := new(MacipACLAddReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
- out := new(MacipACLAddReplaceReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
- out := new(MacipACLDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
- out := new(MacipACLInterfaceAddDelReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
- out := new(MacipACLInterfaceGetReply)
- err := c.ch.SendRequest(in).ReceiveReply(out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion1 // please upgrade the GoVPP api package
-
// Reference imports to suppress errors if they are not otherwise used.
var _ = api.RegisterMessage
+var _ = codec.DecodeString
var _ = bytes.NewBuffer
var _ = context.Background
var _ = io.Copy
var _ = strconv.Itoa
var _ = struc.Pack
+var _ = binary.BigEndian
+var _ = math.Float32bits