// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.5.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/classify.api.json
// Package classify contains generated bindings for API file classify.api.
//
// Contents:
// 3 enums
-// 28 messages
+// 42 messages
//
package classify
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
interface_types "git.fd.io/govpp.git/binapi/interface_types"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
const (
APIFile = "classify"
- APIVersion = "3.0.0"
- VersionCrc = 0x1298bdec
+ APIVersion = "3.1.0"
+ VersionCrc = 0x532123e1
)
// ClassifyAction defines enum 'classify_action'.
type ClassifyAddDelSession struct {
IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
- HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=%!s(float64=4.294967295e+09)" json:"hit_next_index,omitempty"`
- OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=%!s(float64=4.294967295e+09)" json:"opaque_index,omitempty"`
- Advance int32 `binapi:"i32,name=advance,default=%!s(float64=0)" json:"advance,omitempty"`
- Action ClassifyAction `binapi:"classify_action,name=action,default=%!s(float64=0)" json:"action,omitempty"`
- Metadata uint32 `binapi:"u32,name=metadata,default=%!s(float64=0)" json:"metadata,omitempty"`
+ HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=4294967295" json:"hit_next_index,omitempty"`
+ OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
+ Advance int32 `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
+ Action ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
+ Metadata uint32 `binapi:"u32,name=metadata,default=0" json:"metadata,omitempty"`
MatchLen uint32 `binapi:"u32,name=match_len" json:"-"`
Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"`
}
return api.RequestMessage
}
-func (m *ClassifyAddDelSession) Size() int {
+func (m *ClassifyAddDelSession) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 4 // m.TableIndex
size += 4 // m.HitNextIndex
return size
}
func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.TableIndex))
- buf.EncodeUint32(uint32(m.HitNextIndex))
- buf.EncodeUint32(uint32(m.OpaqueIndex))
- buf.EncodeUint32(uint32(m.Advance))
+ buf.EncodeUint32(m.TableIndex)
+ buf.EncodeUint32(m.HitNextIndex)
+ buf.EncodeUint32(m.OpaqueIndex)
+ buf.EncodeInt32(m.Advance)
buf.EncodeUint8(uint8(m.Action))
- buf.EncodeUint32(uint32(m.Metadata))
+ buf.EncodeUint32(m.Metadata)
buf.EncodeUint32(uint32(len(m.Match)))
- buf.EncodeBytes(m.Match[:], 0)
+ buf.EncodeBytes(m.Match, 0)
return buf.Bytes(), nil
}
func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
m.TableIndex = buf.DecodeUint32()
m.HitNextIndex = buf.DecodeUint32()
m.OpaqueIndex = buf.DecodeUint32()
- m.Advance = int32(buf.DecodeUint32())
+ m.Advance = buf.DecodeInt32()
m.Action = ClassifyAction(buf.DecodeUint8())
m.Metadata = buf.DecodeUint32()
m.MatchLen = buf.DecodeUint32()
- copy(m.Match[:], buf.DecodeBytes(0))
+ m.Match = make([]byte, m.MatchLen)
+ copy(m.Match, buf.DecodeBytes(len(m.Match)))
return nil
}
return api.ReplyMessage
}
-func (m *ClassifyAddDelSessionReply) Size() int {
+func (m *ClassifyAddDelSessionReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
type ClassifyAddDelTable struct {
IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
DelChain bool `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
- TableIndex uint32 `binapi:"u32,name=table_index,default=%!s(float64=4.294967295e+09)" json:"table_index,omitempty"`
- Nbuckets uint32 `binapi:"u32,name=nbuckets,default=%!s(float64=2)" json:"nbuckets,omitempty"`
- MemorySize uint32 `binapi:"u32,name=memory_size,default=%!s(float64=2.097152e+06)" json:"memory_size,omitempty"`
- SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=%!s(float64=0)" json:"skip_n_vectors,omitempty"`
- MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=%!s(float64=1)" json:"match_n_vectors,omitempty"`
- NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=%!s(float64=4.294967295e+09)" json:"next_table_index,omitempty"`
- MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=%!s(float64=4.294967295e+09)" json:"miss_next_index,omitempty"`
- CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=%!s(float64=0)" json:"current_data_flag,omitempty"`
- CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=%!s(float64=0)" json:"current_data_offset,omitempty"`
+ TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
+ Nbuckets uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
+ MemorySize uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
+ SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
+ MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
+ NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
+ MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
+ CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
+ CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
}
return api.RequestMessage
}
-func (m *ClassifyAddDelTable) Size() int {
+func (m *ClassifyAddDelTable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsAdd
size += 1 // m.DelChain
size += 4 // m.TableIndex
return size
}
func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeBool(m.DelChain)
- buf.EncodeUint32(uint32(m.TableIndex))
- buf.EncodeUint32(uint32(m.Nbuckets))
- buf.EncodeUint32(uint32(m.MemorySize))
- buf.EncodeUint32(uint32(m.SkipNVectors))
- buf.EncodeUint32(uint32(m.MatchNVectors))
- buf.EncodeUint32(uint32(m.NextTableIndex))
- buf.EncodeUint32(uint32(m.MissNextIndex))
- buf.EncodeUint8(uint8(m.CurrentDataFlag))
- buf.EncodeUint16(uint16(m.CurrentDataOffset))
+ buf.EncodeUint32(m.TableIndex)
+ buf.EncodeUint32(m.Nbuckets)
+ buf.EncodeUint32(m.MemorySize)
+ buf.EncodeUint32(m.SkipNVectors)
+ buf.EncodeUint32(m.MatchNVectors)
+ buf.EncodeUint32(m.NextTableIndex)
+ buf.EncodeUint32(m.MissNextIndex)
+ buf.EncodeUint8(m.CurrentDataFlag)
+ buf.EncodeInt16(m.CurrentDataOffset)
buf.EncodeUint32(uint32(len(m.Mask)))
- buf.EncodeBytes(m.Mask[:], 0)
+ buf.EncodeBytes(m.Mask, 0)
return buf.Bytes(), nil
}
func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
m.NextTableIndex = buf.DecodeUint32()
m.MissNextIndex = buf.DecodeUint32()
m.CurrentDataFlag = buf.DecodeUint8()
- m.CurrentDataOffset = int16(buf.DecodeUint16())
+ m.CurrentDataOffset = buf.DecodeInt16()
m.MaskLen = buf.DecodeUint32()
- copy(m.Mask[:], buf.DecodeBytes(0))
+ m.Mask = make([]byte, m.MaskLen)
+ copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
return nil
}
return api.ReplyMessage
}
-func (m *ClassifyAddDelTableReply) Size() int {
+func (m *ClassifyAddDelTableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.NewTableIndex
size += 4 // m.SkipNVectors
return size
}
func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
- }
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.NewTableIndex))
- buf.EncodeUint32(uint32(m.SkipNVectors))
- buf.EncodeUint32(uint32(m.MatchNVectors))
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.NewTableIndex)
+ buf.EncodeUint32(m.SkipNVectors)
+ buf.EncodeUint32(m.MatchNVectors)
return buf.Bytes(), nil
}
func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.NewTableIndex = buf.DecodeUint32()
m.SkipNVectors = buf.DecodeUint32()
m.MatchNVectors = buf.DecodeUint32()
return nil
}
+// ClassifyPcapGetTables defines message 'classify_pcap_get_tables'.
+type ClassifyPcapGetTables struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *ClassifyPcapGetTables) Reset() { *m = ClassifyPcapGetTables{} }
+func (*ClassifyPcapGetTables) GetMessageName() string { return "classify_pcap_get_tables" }
+func (*ClassifyPcapGetTables) GetCrcString() string { return "f9e6675e" }
+func (*ClassifyPcapGetTables) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ClassifyPcapGetTables) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *ClassifyPcapGetTables) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *ClassifyPcapGetTables) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// ClassifyPcapGetTablesReply defines message 'classify_pcap_get_tables_reply'.
+type ClassifyPcapGetTablesReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Count uint32 `binapi:"u32,name=count" json:"-"`
+ Indices []uint32 `binapi:"u32[count],name=indices" json:"indices,omitempty"`
+}
+
+func (m *ClassifyPcapGetTablesReply) Reset() { *m = ClassifyPcapGetTablesReply{} }
+func (*ClassifyPcapGetTablesReply) GetMessageName() string { return "classify_pcap_get_tables_reply" }
+func (*ClassifyPcapGetTablesReply) GetCrcString() string { return "5f5bc9e6" }
+func (*ClassifyPcapGetTablesReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ClassifyPcapGetTablesReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Count
+ size += 4 * len(m.Indices) // m.Indices
+ return size
+}
+func (m *ClassifyPcapGetTablesReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(len(m.Indices)))
+ for i := 0; i < len(m.Indices); i++ {
+ var x uint32
+ if i < len(m.Indices) {
+ x = uint32(m.Indices[i])
+ }
+ buf.EncodeUint32(x)
+ }
+ return buf.Bytes(), nil
+}
+func (m *ClassifyPcapGetTablesReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Count = buf.DecodeUint32()
+ m.Indices = make([]uint32, m.Count)
+ for i := 0; i < len(m.Indices); i++ {
+ m.Indices[i] = buf.DecodeUint32()
+ }
+ return nil
+}
+
+// ClassifyPcapLookupTable defines message 'classify_pcap_lookup_table'.
+type ClassifyPcapLookupTable struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
+ MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
+ MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
+ Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
+}
+
+func (m *ClassifyPcapLookupTable) Reset() { *m = ClassifyPcapLookupTable{} }
+func (*ClassifyPcapLookupTable) GetMessageName() string { return "classify_pcap_lookup_table" }
+func (*ClassifyPcapLookupTable) GetCrcString() string { return "e1b4cc6b" }
+func (*ClassifyPcapLookupTable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ClassifyPcapLookupTable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.SkipNVectors
+ size += 4 // m.MatchNVectors
+ size += 4 // m.MaskLen
+ size += 1 * len(m.Mask) // m.Mask
+ return size
+}
+func (m *ClassifyPcapLookupTable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.SkipNVectors)
+ buf.EncodeUint32(m.MatchNVectors)
+ buf.EncodeUint32(uint32(len(m.Mask)))
+ buf.EncodeBytes(m.Mask, 0)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyPcapLookupTable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.SkipNVectors = buf.DecodeUint32()
+ m.MatchNVectors = buf.DecodeUint32()
+ m.MaskLen = buf.DecodeUint32()
+ m.Mask = make([]byte, m.MaskLen)
+ copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
+ return nil
+}
+
+// ClassifyPcapLookupTableReply defines message 'classify_pcap_lookup_table_reply'.
+type ClassifyPcapLookupTableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
+}
+
+func (m *ClassifyPcapLookupTableReply) Reset() { *m = ClassifyPcapLookupTableReply{} }
+func (*ClassifyPcapLookupTableReply) GetMessageName() string {
+ return "classify_pcap_lookup_table_reply"
+}
+func (*ClassifyPcapLookupTableReply) GetCrcString() string { return "9c6c6773" }
+func (*ClassifyPcapLookupTableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ClassifyPcapLookupTableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.TableIndex
+ return size
+}
+func (m *ClassifyPcapLookupTableReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TableIndex)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyPcapLookupTableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.TableIndex = buf.DecodeUint32()
+ return nil
+}
+
+// ClassifyPcapSetTable defines message 'classify_pcap_set_table'.
+type ClassifyPcapSetTable struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
+ SortMasks bool `binapi:"bool,name=sort_masks,default=0" json:"sort_masks,omitempty"`
+}
+
+func (m *ClassifyPcapSetTable) Reset() { *m = ClassifyPcapSetTable{} }
+func (*ClassifyPcapSetTable) GetMessageName() string { return "classify_pcap_set_table" }
+func (*ClassifyPcapSetTable) GetCrcString() string { return "006051b3" }
+func (*ClassifyPcapSetTable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ClassifyPcapSetTable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.TableIndex
+ size += 1 // m.SortMasks
+ return size
+}
+func (m *ClassifyPcapSetTable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.TableIndex)
+ buf.EncodeBool(m.SortMasks)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyPcapSetTable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.TableIndex = buf.DecodeUint32()
+ m.SortMasks = buf.DecodeBool()
+ return nil
+}
+
+// ClassifyPcapSetTableReply defines message 'classify_pcap_set_table_reply'.
+type ClassifyPcapSetTableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
+}
+
+func (m *ClassifyPcapSetTableReply) Reset() { *m = ClassifyPcapSetTableReply{} }
+func (*ClassifyPcapSetTableReply) GetMessageName() string { return "classify_pcap_set_table_reply" }
+func (*ClassifyPcapSetTableReply) GetCrcString() string { return "9c6c6773" }
+func (*ClassifyPcapSetTableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ClassifyPcapSetTableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.TableIndex
+ return size
+}
+func (m *ClassifyPcapSetTableReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TableIndex)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyPcapSetTableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.TableIndex = buf.DecodeUint32()
+ return nil
+}
+
// ClassifySessionDetails defines message 'classify_session_details'.
type ClassifySessionDetails struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
return api.ReplyMessage
}
-func (m *ClassifySessionDetails) Size() int {
+func (m *ClassifySessionDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.TableID
size += 4 // m.HitNextIndex
return size
}
func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
- }
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.TableID))
- buf.EncodeUint32(uint32(m.HitNextIndex))
- buf.EncodeUint32(uint32(m.Advance))
- buf.EncodeUint32(uint32(m.OpaqueIndex))
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TableID)
+ buf.EncodeUint32(m.HitNextIndex)
+ buf.EncodeInt32(m.Advance)
+ buf.EncodeUint32(m.OpaqueIndex)
buf.EncodeUint32(uint32(len(m.Match)))
- buf.EncodeBytes(m.Match[:], 0)
+ buf.EncodeBytes(m.Match, 0)
return buf.Bytes(), nil
}
func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.TableID = buf.DecodeUint32()
m.HitNextIndex = buf.DecodeUint32()
- m.Advance = int32(buf.DecodeUint32())
+ m.Advance = buf.DecodeInt32()
m.OpaqueIndex = buf.DecodeUint32()
m.MatchLength = buf.DecodeUint32()
- copy(m.Match[:], buf.DecodeBytes(0))
+ m.Match = make([]byte, m.MatchLength)
+ copy(m.Match, buf.DecodeBytes(len(m.Match)))
return nil
}
return api.RequestMessage
}
-func (m *ClassifySessionDump) Size() int {
+func (m *ClassifySessionDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.TableID
return size
}
func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TableID)
return buf.Bytes(), nil
}
func (m *ClassifySessionDump) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *ClassifySetInterfaceIPTable) Size() int {
+func (m *ClassifySetInterfaceIPTable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsIPv6
size += 4 // m.SwIfIndex
size += 4 // m.TableIndex
return size
}
func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsIPv6)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.TableIndex))
+ buf.EncodeUint32(m.TableIndex)
return buf.Bytes(), nil
}
func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *ClassifySetInterfaceIPTableReply) Size() int {
+func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *ClassifySetInterfaceL2Tables) Size() int {
+func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.IP4TableIndex
size += 4 // m.IP6TableIndex
return size
}
func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IP4TableIndex))
- buf.EncodeUint32(uint32(m.IP6TableIndex))
- buf.EncodeUint32(uint32(m.OtherTableIndex))
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
+ buf.EncodeUint32(m.OtherTableIndex)
buf.EncodeBool(m.IsInput)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *ClassifySetInterfaceL2TablesReply) Size() int {
+func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *ClassifyTableByInterface) Size() int {
+func (m *ClassifyTableByInterface) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
return size
}
func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *ClassifyTableByInterfaceReply) Size() int {
+func (m *ClassifyTableByInterfaceReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.SwIfIndex
size += 4 // m.L2TableID
return size
}
func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.L2TableID))
- buf.EncodeUint32(uint32(m.IP4TableID))
- buf.EncodeUint32(uint32(m.IP6TableID))
+ buf.EncodeUint32(m.L2TableID)
+ buf.EncodeUint32(m.IP4TableID)
+ buf.EncodeUint32(m.IP6TableID)
return buf.Bytes(), nil
}
func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.L2TableID = buf.DecodeUint32()
m.IP4TableID = buf.DecodeUint32()
return api.RequestMessage
}
-func (m *ClassifyTableIds) Size() int {
+func (m *ClassifyTableIds) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
return buf.Bytes(), nil
}
func (m *ClassifyTableIds) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *ClassifyTableIdsReply) Size() int {
+func (m *ClassifyTableIdsReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.Count
size += 4 * len(m.Ids) // m.Ids
return size
}
func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
buf.EncodeUint32(uint32(len(m.Ids)))
for i := 0; i < len(m.Ids); i++ {
var x uint32
if i < len(m.Ids) {
x = uint32(m.Ids[i])
}
- buf.EncodeUint32(uint32(x))
+ buf.EncodeUint32(x)
}
return buf.Bytes(), nil
}
func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.Count = buf.DecodeUint32()
m.Ids = make([]uint32, m.Count)
for i := 0; i < len(m.Ids); i++ {
return api.RequestMessage
}
-func (m *ClassifyTableInfo) Size() int {
+func (m *ClassifyTableInfo) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.TableID
return size
}
func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.TableID))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TableID)
return buf.Bytes(), nil
}
func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *ClassifyTableInfoReply) Size() int {
+func (m *ClassifyTableInfoReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.TableID
size += 4 // m.Nbuckets
return size
}
func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
- }
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.TableID))
- buf.EncodeUint32(uint32(m.Nbuckets))
- buf.EncodeUint32(uint32(m.MatchNVectors))
- buf.EncodeUint32(uint32(m.SkipNVectors))
- buf.EncodeUint32(uint32(m.ActiveSessions))
- buf.EncodeUint32(uint32(m.NextTableIndex))
- buf.EncodeUint32(uint32(m.MissNextIndex))
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TableID)
+ buf.EncodeUint32(m.Nbuckets)
+ buf.EncodeUint32(m.MatchNVectors)
+ buf.EncodeUint32(m.SkipNVectors)
+ buf.EncodeUint32(m.ActiveSessions)
+ buf.EncodeUint32(m.NextTableIndex)
+ buf.EncodeUint32(m.MissNextIndex)
buf.EncodeUint32(uint32(len(m.Mask)))
- buf.EncodeBytes(m.Mask[:], 0)
+ buf.EncodeBytes(m.Mask, 0)
return buf.Bytes(), nil
}
func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.TableID = buf.DecodeUint32()
m.Nbuckets = buf.DecodeUint32()
m.MatchNVectors = buf.DecodeUint32()
m.NextTableIndex = buf.DecodeUint32()
m.MissNextIndex = buf.DecodeUint32()
m.MaskLength = buf.DecodeUint32()
- copy(m.Mask[:], buf.DecodeBytes(0))
+ m.Mask = make([]byte, m.MaskLength)
+ copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
+ return nil
+}
+
+// ClassifyTraceGetTables defines message 'classify_trace_get_tables'.
+type ClassifyTraceGetTables struct{}
+
+func (m *ClassifyTraceGetTables) Reset() { *m = ClassifyTraceGetTables{} }
+func (*ClassifyTraceGetTables) GetMessageName() string { return "classify_trace_get_tables" }
+func (*ClassifyTraceGetTables) GetCrcString() string { return "51077d14" }
+func (*ClassifyTraceGetTables) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ClassifyTraceGetTables) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *ClassifyTraceGetTables) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyTraceGetTables) Unmarshal(b []byte) error {
+ return nil
+}
+
+// ClassifyTraceGetTablesReply defines message 'classify_trace_get_tables_reply'.
+type ClassifyTraceGetTablesReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Count uint32 `binapi:"u32,name=count" json:"-"`
+ Indices []uint32 `binapi:"u32[count],name=indices" json:"indices,omitempty"`
+}
+
+func (m *ClassifyTraceGetTablesReply) Reset() { *m = ClassifyTraceGetTablesReply{} }
+func (*ClassifyTraceGetTablesReply) GetMessageName() string { return "classify_trace_get_tables_reply" }
+func (*ClassifyTraceGetTablesReply) GetCrcString() string { return "5f5bc9e6" }
+func (*ClassifyTraceGetTablesReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ClassifyTraceGetTablesReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Count
+ size += 4 * len(m.Indices) // m.Indices
+ return size
+}
+func (m *ClassifyTraceGetTablesReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(len(m.Indices)))
+ for i := 0; i < len(m.Indices); i++ {
+ var x uint32
+ if i < len(m.Indices) {
+ x = uint32(m.Indices[i])
+ }
+ buf.EncodeUint32(x)
+ }
+ return buf.Bytes(), nil
+}
+func (m *ClassifyTraceGetTablesReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Count = buf.DecodeUint32()
+ m.Indices = make([]uint32, m.Count)
+ for i := 0; i < len(m.Indices); i++ {
+ m.Indices[i] = buf.DecodeUint32()
+ }
+ return nil
+}
+
+// ClassifyTraceLookupTable defines message 'classify_trace_lookup_table'.
+type ClassifyTraceLookupTable struct {
+ SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
+ MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
+ MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
+ Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
+}
+
+func (m *ClassifyTraceLookupTable) Reset() { *m = ClassifyTraceLookupTable{} }
+func (*ClassifyTraceLookupTable) GetMessageName() string { return "classify_trace_lookup_table" }
+func (*ClassifyTraceLookupTable) GetCrcString() string { return "3f7b72e4" }
+func (*ClassifyTraceLookupTable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ClassifyTraceLookupTable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SkipNVectors
+ size += 4 // m.MatchNVectors
+ size += 4 // m.MaskLen
+ size += 1 * len(m.Mask) // m.Mask
+ return size
+}
+func (m *ClassifyTraceLookupTable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.SkipNVectors)
+ buf.EncodeUint32(m.MatchNVectors)
+ buf.EncodeUint32(uint32(len(m.Mask)))
+ buf.EncodeBytes(m.Mask, 0)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyTraceLookupTable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SkipNVectors = buf.DecodeUint32()
+ m.MatchNVectors = buf.DecodeUint32()
+ m.MaskLen = buf.DecodeUint32()
+ m.Mask = make([]byte, m.MaskLen)
+ copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
+ return nil
+}
+
+// ClassifyTraceLookupTableReply defines message 'classify_trace_lookup_table_reply'.
+type ClassifyTraceLookupTableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
+}
+
+func (m *ClassifyTraceLookupTableReply) Reset() { *m = ClassifyTraceLookupTableReply{} }
+func (*ClassifyTraceLookupTableReply) GetMessageName() string {
+ return "classify_trace_lookup_table_reply"
+}
+func (*ClassifyTraceLookupTableReply) GetCrcString() string { return "9c6c6773" }
+func (*ClassifyTraceLookupTableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ClassifyTraceLookupTableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.TableIndex
+ return size
+}
+func (m *ClassifyTraceLookupTableReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TableIndex)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyTraceLookupTableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.TableIndex = buf.DecodeUint32()
+ return nil
+}
+
+// ClassifyTraceSetTable defines message 'classify_trace_set_table'.
+type ClassifyTraceSetTable struct {
+ TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
+ SortMasks bool `binapi:"bool,name=sort_masks,default=0" json:"sort_masks,omitempty"`
+}
+
+func (m *ClassifyTraceSetTable) Reset() { *m = ClassifyTraceSetTable{} }
+func (*ClassifyTraceSetTable) GetMessageName() string { return "classify_trace_set_table" }
+func (*ClassifyTraceSetTable) GetCrcString() string { return "3909b55a" }
+func (*ClassifyTraceSetTable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ClassifyTraceSetTable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.TableIndex
+ size += 1 // m.SortMasks
+ return size
+}
+func (m *ClassifyTraceSetTable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.TableIndex)
+ buf.EncodeBool(m.SortMasks)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyTraceSetTable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.TableIndex = buf.DecodeUint32()
+ m.SortMasks = buf.DecodeBool()
+ return nil
+}
+
+// ClassifyTraceSetTableReply defines message 'classify_trace_set_table_reply'.
+type ClassifyTraceSetTableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
+}
+
+func (m *ClassifyTraceSetTableReply) Reset() { *m = ClassifyTraceSetTableReply{} }
+func (*ClassifyTraceSetTableReply) GetMessageName() string { return "classify_trace_set_table_reply" }
+func (*ClassifyTraceSetTableReply) GetCrcString() string { return "9c6c6773" }
+func (*ClassifyTraceSetTableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ClassifyTraceSetTableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.TableIndex
+ return size
+}
+func (m *ClassifyTraceSetTableReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.TableIndex)
+ return buf.Bytes(), nil
+}
+func (m *ClassifyTraceSetTableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.TableIndex = buf.DecodeUint32()
return nil
}
return api.ReplyMessage
}
-func (m *FlowClassifyDetails) Size() int {
+func (m *FlowClassifyDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.TableIndex
return size
}
func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.TableIndex))
+ buf.EncodeUint32(m.TableIndex)
return buf.Bytes(), nil
}
func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *FlowClassifyDump) Size() int {
+func (m *FlowClassifyDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Type
size += 4 // m.SwIfIndex
return size
}
func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Type))
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *FlowClassifySetInterface) Size() int {
+func (m *FlowClassifySetInterface) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.IP4TableIndex
size += 4 // m.IP6TableIndex
return size
}
func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IP4TableIndex))
- buf.EncodeUint32(uint32(m.IP6TableIndex))
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *FlowClassifySetInterfaceReply) Size() int {
+func (m *FlowClassifySetInterfaceReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *InputACLSetInterface) Size() int {
+func (m *InputACLSetInterface) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.IP4TableIndex
size += 4 // m.IP6TableIndex
return size
}
func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IP4TableIndex))
- buf.EncodeUint32(uint32(m.IP6TableIndex))
- buf.EncodeUint32(uint32(m.L2TableIndex))
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
+ buf.EncodeUint32(m.L2TableIndex)
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *InputACLSetInterfaceReply) Size() int {
+func (m *InputACLSetInterfaceReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *OutputACLSetInterface) Size() int {
+func (m *OutputACLSetInterface) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.IP4TableIndex
size += 4 // m.IP6TableIndex
return size
}
func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IP4TableIndex))
- buf.EncodeUint32(uint32(m.IP6TableIndex))
- buf.EncodeUint32(uint32(m.L2TableIndex))
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
+ buf.EncodeUint32(m.L2TableIndex)
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *OutputACLSetInterfaceReply) Size() int {
+func (m *OutputACLSetInterfaceReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.ReplyMessage
}
-func (m *PolicerClassifyDetails) Size() int {
+func (m *PolicerClassifyDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.TableIndex
return size
}
func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.TableIndex))
+ buf.EncodeUint32(m.TableIndex)
return buf.Bytes(), nil
}
func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
return api.RequestMessage
}
-func (m *PolicerClassifyDump) Size() int {
+func (m *PolicerClassifyDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Type
size += 4 // m.SwIfIndex
return size
}
func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.Type))
buf.EncodeUint32(uint32(m.SwIfIndex))
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *PolicerClassifySetInterface) Size() int {
+func (m *PolicerClassifySetInterface) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.SwIfIndex
size += 4 // m.IP4TableIndex
size += 4 // m.IP6TableIndex
return size
}
func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IP4TableIndex))
- buf.EncodeUint32(uint32(m.IP6TableIndex))
- buf.EncodeUint32(uint32(m.L2TableIndex))
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
+ buf.EncodeUint32(m.L2TableIndex)
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *PolicerClassifySetInterfaceReply) Size() int {
+func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// PuntACLAddDel defines message 'punt_acl_add_del'.
+type PuntACLAddDel struct {
+ IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index,default=4294967295" json:"ip4_table_index,omitempty"`
+ IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index,default=4294967295" json:"ip6_table_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+}
+
+func (m *PuntACLAddDel) Reset() { *m = PuntACLAddDel{} }
+func (*PuntACLAddDel) GetMessageName() string { return "punt_acl_add_del" }
+func (*PuntACLAddDel) GetCrcString() string { return "a93bf3a0" }
+func (*PuntACLAddDel) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *PuntACLAddDel) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.IP4TableIndex
+ size += 4 // m.IP6TableIndex
+ size += 1 // m.IsAdd
+ return size
+}
+func (m *PuntACLAddDel) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
+ buf.EncodeBool(m.IsAdd)
+ return buf.Bytes(), nil
+}
+func (m *PuntACLAddDel) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IP4TableIndex = buf.DecodeUint32()
+ m.IP6TableIndex = buf.DecodeUint32()
+ m.IsAdd = buf.DecodeBool()
+ return nil
+}
+
+// PuntACLAddDelReply defines message 'punt_acl_add_del_reply'.
+type PuntACLAddDelReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *PuntACLAddDelReply) Reset() { *m = PuntACLAddDelReply{} }
+func (*PuntACLAddDelReply) GetMessageName() string { return "punt_acl_add_del_reply" }
+func (*PuntACLAddDelReply) GetCrcString() string { return "e8d4e804" }
+func (*PuntACLAddDelReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *PuntACLAddDelReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *PuntACLAddDelReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *PuntACLAddDelReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
return nil
}
api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
+ api.RegisterMessage((*ClassifyPcapGetTables)(nil), "classify_pcap_get_tables_f9e6675e")
+ api.RegisterMessage((*ClassifyPcapGetTablesReply)(nil), "classify_pcap_get_tables_reply_5f5bc9e6")
+ api.RegisterMessage((*ClassifyPcapLookupTable)(nil), "classify_pcap_lookup_table_e1b4cc6b")
+ api.RegisterMessage((*ClassifyPcapLookupTableReply)(nil), "classify_pcap_lookup_table_reply_9c6c6773")
+ api.RegisterMessage((*ClassifyPcapSetTable)(nil), "classify_pcap_set_table_006051b3")
+ api.RegisterMessage((*ClassifyPcapSetTableReply)(nil), "classify_pcap_set_table_reply_9c6c6773")
api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
+ api.RegisterMessage((*ClassifyTraceGetTables)(nil), "classify_trace_get_tables_51077d14")
+ api.RegisterMessage((*ClassifyTraceGetTablesReply)(nil), "classify_trace_get_tables_reply_5f5bc9e6")
+ api.RegisterMessage((*ClassifyTraceLookupTable)(nil), "classify_trace_lookup_table_3f7b72e4")
+ api.RegisterMessage((*ClassifyTraceLookupTableReply)(nil), "classify_trace_lookup_table_reply_9c6c6773")
+ api.RegisterMessage((*ClassifyTraceSetTable)(nil), "classify_trace_set_table_3909b55a")
+ api.RegisterMessage((*ClassifyTraceSetTableReply)(nil), "classify_trace_set_table_reply_9c6c6773")
api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
+ api.RegisterMessage((*PuntACLAddDel)(nil), "punt_acl_add_del_a93bf3a0")
+ api.RegisterMessage((*PuntACLAddDelReply)(nil), "punt_acl_add_del_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
(*ClassifyAddDelSessionReply)(nil),
(*ClassifyAddDelTable)(nil),
(*ClassifyAddDelTableReply)(nil),
+ (*ClassifyPcapGetTables)(nil),
+ (*ClassifyPcapGetTablesReply)(nil),
+ (*ClassifyPcapLookupTable)(nil),
+ (*ClassifyPcapLookupTableReply)(nil),
+ (*ClassifyPcapSetTable)(nil),
+ (*ClassifyPcapSetTableReply)(nil),
(*ClassifySessionDetails)(nil),
(*ClassifySessionDump)(nil),
(*ClassifySetInterfaceIPTable)(nil),
(*ClassifyTableIdsReply)(nil),
(*ClassifyTableInfo)(nil),
(*ClassifyTableInfoReply)(nil),
+ (*ClassifyTraceGetTables)(nil),
+ (*ClassifyTraceGetTablesReply)(nil),
+ (*ClassifyTraceLookupTable)(nil),
+ (*ClassifyTraceLookupTableReply)(nil),
+ (*ClassifyTraceSetTable)(nil),
+ (*ClassifyTraceSetTableReply)(nil),
(*FlowClassifyDetails)(nil),
(*FlowClassifyDump)(nil),
(*FlowClassifySetInterface)(nil),
(*PolicerClassifyDump)(nil),
(*PolicerClassifySetInterface)(nil),
(*PolicerClassifySetInterfaceReply)(nil),
+ (*PuntACLAddDel)(nil),
+ (*PuntACLAddDelReply)(nil),
}
}