// Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.4.0-dev // VPP: 20.05-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 // 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" ) // 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 const ( APIFile = "classify" APIVersion = "3.0.0" VersionCrc = 0x1298bdec ) // ClassifyAction defines enum 'classify_action'. type ClassifyAction uint8 const ( CLASSIFY_API_ACTION_NONE ClassifyAction = 0 CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX ClassifyAction = 1 CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX ClassifyAction = 2 CLASSIFY_API_ACTION_SET_METADATA ClassifyAction = 3 ) var ( ClassifyAction_name = map[uint8]string{ 0: "CLASSIFY_API_ACTION_NONE", 1: "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX", 2: "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX", 3: "CLASSIFY_API_ACTION_SET_METADATA", } ClassifyAction_value = map[string]uint8{ "CLASSIFY_API_ACTION_NONE": 0, "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX": 1, "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX": 2, "CLASSIFY_API_ACTION_SET_METADATA": 3, } ) func (x ClassifyAction) String() string { s, ok := ClassifyAction_name[uint8(x)] if ok { return s } return "ClassifyAction(" + strconv.Itoa(int(x)) + ")" } // FlowClassifyTable defines enum 'flow_classify_table'. type FlowClassifyTable uint8 const ( FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 1 FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 2 ) var ( FlowClassifyTable_name = map[uint8]string{ 1: "FLOW_CLASSIFY_API_TABLE_IP4", 2: "FLOW_CLASSIFY_API_TABLE_IP6", } FlowClassifyTable_value = map[string]uint8{ "FLOW_CLASSIFY_API_TABLE_IP4": 1, "FLOW_CLASSIFY_API_TABLE_IP6": 2, } ) func (x FlowClassifyTable) String() string { s, ok := FlowClassifyTable_name[uint8(x)] if ok { return s } return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")" } // PolicerClassifyTable defines enum 'policer_classify_table'. type PolicerClassifyTable uint8 const ( POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1 POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2 POLICER_CLASSIFY_API_TABLE_L2 PolicerClassifyTable = 3 ) var ( PolicerClassifyTable_name = map[uint8]string{ 1: "POLICER_CLASSIFY_API_TABLE_IP4", 2: "POLICER_CLASSIFY_API_TABLE_IP6", 3: "POLICER_CLASSIFY_API_TABLE_L2", } PolicerClassifyTable_value = map[string]uint8{ "POLICER_CLASSIFY_API_TABLE_IP4": 1, "POLICER_CLASSIFY_API_TABLE_IP6": 2, "POLICER_CLASSIFY_API_TABLE_L2": 3, } ) func (x PolicerClassifyTable) String() string { s, ok := PolicerClassifyTable_name[uint8(x)] if ok { return s } return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")" } // ClassifyAddDelSession defines message 'classify_add_del_session'. 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=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"` } func (m *ClassifyAddDelSession) Reset() { *m = ClassifyAddDelSession{} } func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" } func (*ClassifyAddDelSession) GetCrcString() string { return "f20879f0" } func (*ClassifyAddDelSession) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifyAddDelSession) Size() (size int) { if m == nil { return 0 } size += 1 // m.IsAdd size += 4 // m.TableIndex size += 4 // m.HitNextIndex size += 4 // m.OpaqueIndex size += 4 // m.Advance size += 1 // m.Action size += 4 // m.Metadata size += 4 // m.MatchLen size += 1 * len(m.Match) // m.Match return size } func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) buf.EncodeUint32(m.TableIndex) buf.EncodeUint32(m.HitNextIndex) buf.EncodeUint32(m.OpaqueIndex) buf.EncodeInt32(m.Advance) buf.EncodeUint8(uint8(m.Action)) buf.EncodeUint32(m.Metadata) buf.EncodeUint32(uint32(len(m.Match))) buf.EncodeBytes(m.Match, 0) return buf.Bytes(), nil } func (m *ClassifyAddDelSession) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.IsAdd = buf.DecodeBool() m.TableIndex = buf.DecodeUint32() m.HitNextIndex = buf.DecodeUint32() m.OpaqueIndex = buf.DecodeUint32() m.Advance = buf.DecodeInt32() m.Action = ClassifyAction(buf.DecodeUint8()) m.Metadata = buf.DecodeUint32() m.MatchLen = buf.DecodeUint32() m.Match = make([]byte, m.MatchLen) copy(m.Match, buf.DecodeBytes(len(m.Match))) return nil } // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'. type ClassifyAddDelSessionReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *ClassifyAddDelSessionReply) Reset() { *m = ClassifyAddDelSessionReply{} } func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" } func (*ClassifyAddDelSessionReply) GetCrcString() string { return "e8d4e804" } func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifyAddDelSessionReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *ClassifyAddDelSessionReply) 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 *ClassifyAddDelSessionReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // ClassifyAddDelTable defines message 'classify_add_del_table'. 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=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"` } func (m *ClassifyAddDelTable) Reset() { *m = ClassifyAddDelTable{} } func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" } func (*ClassifyAddDelTable) GetCrcString() string { return "6849e39e" } func (*ClassifyAddDelTable) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifyAddDelTable) Size() (size int) { if m == nil { return 0 } size += 1 // m.IsAdd size += 1 // m.DelChain size += 4 // m.TableIndex size += 4 // m.Nbuckets size += 4 // m.MemorySize size += 4 // m.SkipNVectors size += 4 // m.MatchNVectors size += 4 // m.NextTableIndex size += 4 // m.MissNextIndex size += 1 // m.CurrentDataFlag size += 2 // m.CurrentDataOffset size += 4 // m.MaskLen size += 1 * len(m.Mask) // m.Mask return size } func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBool(m.IsAdd) buf.EncodeBool(m.DelChain) 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) return buf.Bytes(), nil } func (m *ClassifyAddDelTable) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.IsAdd = buf.DecodeBool() m.DelChain = buf.DecodeBool() m.TableIndex = buf.DecodeUint32() m.Nbuckets = buf.DecodeUint32() m.MemorySize = buf.DecodeUint32() m.SkipNVectors = buf.DecodeUint32() m.MatchNVectors = buf.DecodeUint32() m.NextTableIndex = buf.DecodeUint32() m.MissNextIndex = buf.DecodeUint32() m.CurrentDataFlag = buf.DecodeUint8() m.CurrentDataOffset = buf.DecodeInt16() m.MaskLen = buf.DecodeUint32() m.Mask = make([]byte, m.MaskLen) copy(m.Mask, buf.DecodeBytes(len(m.Mask))) return nil } // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'. type ClassifyAddDelTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"` SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"` MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"` } func (m *ClassifyAddDelTableReply) Reset() { *m = ClassifyAddDelTableReply{} } func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" } func (*ClassifyAddDelTableReply) GetCrcString() string { return "05486349" } func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifyAddDelTableReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval size += 4 // m.NewTableIndex size += 4 // m.SkipNVectors size += 4 // m.MatchNVectors return size } func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) { if b == nil { 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 = buf.DecodeInt32() m.NewTableIndex = buf.DecodeUint32() m.SkipNVectors = buf.DecodeUint32() m.MatchNVectors = buf.DecodeUint32() return nil } // ClassifySessionDetails defines message 'classify_session_details'. type ClassifySessionDetails struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"` Advance int32 `binapi:"i32,name=advance" json:"advance,omitempty"` OpaqueIndex uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"` MatchLength uint32 `binapi:"u32,name=match_length" json:"-"` Match []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"` } func (m *ClassifySessionDetails) Reset() { *m = ClassifySessionDetails{} } func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" } func (*ClassifySessionDetails) GetCrcString() string { return "60e3ef94" } func (*ClassifySessionDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifySessionDetails) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval size += 4 // m.TableID size += 4 // m.HitNextIndex size += 4 // m.Advance size += 4 // m.OpaqueIndex size += 4 // m.MatchLength size += 1 * len(m.Match) // m.Match return size } func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) { if b == nil { 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) return buf.Bytes(), nil } func (m *ClassifySessionDetails) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() m.TableID = buf.DecodeUint32() m.HitNextIndex = buf.DecodeUint32() m.Advance = buf.DecodeInt32() m.OpaqueIndex = buf.DecodeUint32() m.MatchLength = buf.DecodeUint32() m.Match = make([]byte, m.MatchLength) copy(m.Match, buf.DecodeBytes(len(m.Match))) return nil } // ClassifySessionDump defines message 'classify_session_dump'. type ClassifySessionDump struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` } func (m *ClassifySessionDump) Reset() { *m = ClassifySessionDump{} } func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" } func (*ClassifySessionDump) GetCrcString() string { return "0cca2cd9" } func (*ClassifySessionDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifySessionDump) Size() (size int) { if m == nil { return 0 } size += 4 // m.TableID return size } func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.TableID) return buf.Bytes(), nil } func (m *ClassifySessionDump) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.TableID = buf.DecodeUint32() return nil } // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'. type ClassifySetInterfaceIPTable struct { IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"` } func (m *ClassifySetInterfaceIPTable) Reset() { *m = ClassifySetInterfaceIPTable{} } func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" } func (*ClassifySetInterfaceIPTable) GetCrcString() string { return "e0b097c7" } func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifySetInterfaceIPTable) Size() (size int) { if m == nil { return 0 } size += 1 // m.IsIPv6 size += 4 // m.SwIfIndex size += 4 // m.TableIndex return size } func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBool(m.IsIPv6) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeUint32(m.TableIndex) return buf.Bytes(), nil } func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.IsIPv6 = buf.DecodeBool() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.TableIndex = buf.DecodeUint32() return nil } // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'. type ClassifySetInterfaceIPTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} } func (*ClassifySetInterfaceIPTableReply) GetMessageName() string { return "classify_set_interface_ip_table_reply" } func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" } func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifySetInterfaceIPTableReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *ClassifySetInterfaceIPTableReply) 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 *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'. type ClassifySetInterfaceL2Tables struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"` IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"` OtherTableIndex uint32 `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"` IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"` } func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} } func (*ClassifySetInterfaceL2Tables) GetMessageName() string { return "classify_set_interface_l2_tables" } func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" } func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifySetInterfaceL2Tables) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.IP4TableIndex size += 4 // m.IP6TableIndex size += 4 // m.OtherTableIndex size += 1 // m.IsInput return size } func (m *ClassifySetInterfaceL2Tables) 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.IP4TableIndex) buf.EncodeUint32(m.IP6TableIndex) buf.EncodeUint32(m.OtherTableIndex) buf.EncodeBool(m.IsInput) return buf.Bytes(), nil } func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IP4TableIndex = buf.DecodeUint32() m.IP6TableIndex = buf.DecodeUint32() m.OtherTableIndex = buf.DecodeUint32() m.IsInput = buf.DecodeBool() return nil } // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'. type ClassifySetInterfaceL2TablesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} } func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string { return "classify_set_interface_l2_tables_reply" } func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" } func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *ClassifySetInterfaceL2TablesReply) 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 *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // ClassifyTableByInterface defines message 'classify_table_by_interface'. type ClassifyTableByInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } func (m *ClassifyTableByInterface) Reset() { *m = ClassifyTableByInterface{} } func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" } func (*ClassifyTableByInterface) GetCrcString() string { return "f9e6675e" } func (*ClassifyTableByInterface) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifyTableByInterface) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex return size } func (m *ClassifyTableByInterface) 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 *ClassifyTableByInterface) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'. type ClassifyTableByInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` L2TableID uint32 `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"` IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"` IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"` } func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} } func (*ClassifyTableByInterfaceReply) GetMessageName() string { return "classify_table_by_interface_reply" } func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" } func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifyTableByInterfaceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval size += 4 // m.SwIfIndex size += 4 // m.L2TableID size += 4 // m.IP4TableID size += 4 // m.IP6TableID return size } func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeInt32(m.Retval) buf.EncodeUint32(uint32(m.SwIfIndex)) 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 = buf.DecodeInt32() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.L2TableID = buf.DecodeUint32() m.IP4TableID = buf.DecodeUint32() m.IP6TableID = buf.DecodeUint32() return nil } // ClassifyTableIds defines message 'classify_table_ids'. type ClassifyTableIds struct{} func (m *ClassifyTableIds) Reset() { *m = ClassifyTableIds{} } func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" } func (*ClassifyTableIds) GetCrcString() string { return "51077d14" } func (*ClassifyTableIds) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifyTableIds) Size() (size int) { if m == nil { return 0 } return size } func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *ClassifyTableIds) Unmarshal(b []byte) error { return nil } // ClassifyTableIdsReply defines message 'classify_table_ids_reply'. type ClassifyTableIdsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` Count uint32 `binapi:"u32,name=count" json:"-"` Ids []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"` } func (m *ClassifyTableIdsReply) Reset() { *m = ClassifyTableIdsReply{} } func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" } func (*ClassifyTableIdsReply) GetCrcString() string { return "d1d20e1d" } func (*ClassifyTableIdsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifyTableIdsReply) Size() (size int) { if m == nil { return 0 } 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) { if b == nil { b = make([]byte, m.Size()) } 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(x) } return buf.Bytes(), nil } func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() m.Count = buf.DecodeUint32() m.Ids = make([]uint32, m.Count) for i := 0; i < len(m.Ids); i++ { m.Ids[i] = buf.DecodeUint32() } return nil } // ClassifyTableInfo defines message 'classify_table_info'. type ClassifyTableInfo struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` } func (m *ClassifyTableInfo) Reset() { *m = ClassifyTableInfo{} } func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" } func (*ClassifyTableInfo) GetCrcString() string { return "0cca2cd9" } func (*ClassifyTableInfo) GetMessageType() api.MessageType { return api.RequestMessage } func (m *ClassifyTableInfo) Size() (size int) { if m == nil { return 0 } size += 4 // m.TableID return size } func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.TableID) return buf.Bytes(), nil } func (m *ClassifyTableInfo) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.TableID = buf.DecodeUint32() return nil } // ClassifyTableInfoReply defines message 'classify_table_info_reply'. type ClassifyTableInfoReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` Nbuckets uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"` MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"` SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"` ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"` NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"` MissNextIndex uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"` MaskLength uint32 `binapi:"u32,name=mask_length" json:"-"` Mask []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"` } func (m *ClassifyTableInfoReply) Reset() { *m = ClassifyTableInfoReply{} } func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" } func (*ClassifyTableInfoReply) GetCrcString() string { return "4a573c0e" } func (*ClassifyTableInfoReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *ClassifyTableInfoReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval size += 4 // m.TableID size += 4 // m.Nbuckets size += 4 // m.MatchNVectors size += 4 // m.SkipNVectors size += 4 // m.ActiveSessions size += 4 // m.NextTableIndex size += 4 // m.MissNextIndex size += 4 // m.MaskLength size += 1 * len(m.Mask) // m.Mask return size } func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) { if b == nil { 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) return buf.Bytes(), nil } func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() m.TableID = buf.DecodeUint32() m.Nbuckets = buf.DecodeUint32() m.MatchNVectors = buf.DecodeUint32() m.SkipNVectors = buf.DecodeUint32() m.ActiveSessions = buf.DecodeUint32() m.NextTableIndex = buf.DecodeUint32() m.MissNextIndex = buf.DecodeUint32() m.MaskLength = buf.DecodeUint32() m.Mask = make([]byte, m.MaskLength) copy(m.Mask, buf.DecodeBytes(len(m.Mask))) return nil } // FlowClassifyDetails defines message 'flow_classify_details'. type FlowClassifyDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"` } func (m *FlowClassifyDetails) Reset() { *m = FlowClassifyDetails{} } func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" } func (*FlowClassifyDetails) GetCrcString() string { return "dfd08765" } func (*FlowClassifyDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *FlowClassifyDetails) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.TableIndex return size } func (m *FlowClassifyDetails) 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) return buf.Bytes(), nil } func (m *FlowClassifyDetails) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.TableIndex = buf.DecodeUint32() return nil } // FlowClassifyDump defines message 'flow_classify_dump'. type FlowClassifyDump struct { Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } func (m *FlowClassifyDump) Reset() { *m = FlowClassifyDump{} } func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" } func (*FlowClassifyDump) GetCrcString() string { return "8a6ad43d" } func (*FlowClassifyDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *FlowClassifyDump) Size() (size int) { if m == nil { return 0 } size += 1 // m.Type size += 4 // m.SwIfIndex return size } func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint8(uint8(m.Type)) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *FlowClassifyDump) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Type = FlowClassifyTable(buf.DecodeUint8()) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // FlowClassifySetInterface defines message 'flow_classify_set_interface'. type FlowClassifySetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"` IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` } func (m *FlowClassifySetInterface) Reset() { *m = FlowClassifySetInterface{} } func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" } func (*FlowClassifySetInterface) GetCrcString() string { return "b6192f1c" } func (*FlowClassifySetInterface) GetMessageType() api.MessageType { return api.RequestMessage } func (m *FlowClassifySetInterface) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.IP4TableIndex size += 4 // m.IP6TableIndex size += 1 // m.IsAdd return size } func (m *FlowClassifySetInterface) 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.IP4TableIndex) buf.EncodeUint32(m.IP6TableIndex) buf.EncodeBool(m.IsAdd) return buf.Bytes(), nil } func (m *FlowClassifySetInterface) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IP4TableIndex = buf.DecodeUint32() m.IP6TableIndex = buf.DecodeUint32() m.IsAdd = buf.DecodeBool() return nil } // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'. type FlowClassifySetInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} } func (*FlowClassifySetInterfaceReply) GetMessageName() string { return "flow_classify_set_interface_reply" } func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" } func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *FlowClassifySetInterfaceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *FlowClassifySetInterfaceReply) 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 *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // InputACLSetInterface defines message 'input_acl_set_interface'. type InputACLSetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"` IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"` L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` } func (m *InputACLSetInterface) Reset() { *m = InputACLSetInterface{} } func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" } func (*InputACLSetInterface) GetCrcString() string { return "de7ad708" } func (*InputACLSetInterface) GetMessageType() api.MessageType { return api.RequestMessage } func (m *InputACLSetInterface) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.IP4TableIndex size += 4 // m.IP6TableIndex size += 4 // m.L2TableIndex size += 1 // m.IsAdd return size } func (m *InputACLSetInterface) 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.IP4TableIndex) buf.EncodeUint32(m.IP6TableIndex) buf.EncodeUint32(m.L2TableIndex) buf.EncodeBool(m.IsAdd) return buf.Bytes(), nil } func (m *InputACLSetInterface) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IP4TableIndex = buf.DecodeUint32() m.IP6TableIndex = buf.DecodeUint32() m.L2TableIndex = buf.DecodeUint32() m.IsAdd = buf.DecodeBool() return nil } // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'. type InputACLSetInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *InputACLSetInterfaceReply) Reset() { *m = InputACLSetInterfaceReply{} } func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" } func (*InputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" } func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *InputACLSetInterfaceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *InputACLSetInterfaceReply) 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 *InputACLSetInterfaceReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // OutputACLSetInterface defines message 'output_acl_set_interface'. type OutputACLSetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"` IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"` L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` } func (m *OutputACLSetInterface) Reset() { *m = OutputACLSetInterface{} } func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" } func (*OutputACLSetInterface) GetCrcString() string { return "de7ad708" } func (*OutputACLSetInterface) GetMessageType() api.MessageType { return api.RequestMessage } func (m *OutputACLSetInterface) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.IP4TableIndex size += 4 // m.IP6TableIndex size += 4 // m.L2TableIndex size += 1 // m.IsAdd return size } func (m *OutputACLSetInterface) 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.IP4TableIndex) buf.EncodeUint32(m.IP6TableIndex) buf.EncodeUint32(m.L2TableIndex) buf.EncodeBool(m.IsAdd) return buf.Bytes(), nil } func (m *OutputACLSetInterface) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IP4TableIndex = buf.DecodeUint32() m.IP6TableIndex = buf.DecodeUint32() m.L2TableIndex = buf.DecodeUint32() m.IsAdd = buf.DecodeBool() return nil } // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'. type OutputACLSetInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *OutputACLSetInterfaceReply) Reset() { *m = OutputACLSetInterfaceReply{} } func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" } func (*OutputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" } func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *OutputACLSetInterfaceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *OutputACLSetInterfaceReply) 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 *OutputACLSetInterfaceReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // PolicerClassifyDetails defines message 'policer_classify_details'. type PolicerClassifyDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"` } func (m *PolicerClassifyDetails) Reset() { *m = PolicerClassifyDetails{} } func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" } func (*PolicerClassifyDetails) GetCrcString() string { return "dfd08765" } func (*PolicerClassifyDetails) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *PolicerClassifyDetails) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.TableIndex return size } func (m *PolicerClassifyDetails) 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) return buf.Bytes(), nil } func (m *PolicerClassifyDetails) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.TableIndex = buf.DecodeUint32() return nil } // PolicerClassifyDump defines message 'policer_classify_dump'. type PolicerClassifyDump struct { Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } func (m *PolicerClassifyDump) Reset() { *m = PolicerClassifyDump{} } func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" } func (*PolicerClassifyDump) GetCrcString() string { return "6bfe6603" } func (*PolicerClassifyDump) GetMessageType() api.MessageType { return api.RequestMessage } func (m *PolicerClassifyDump) Size() (size int) { if m == nil { return 0 } size += 1 // m.Type size += 4 // m.SwIfIndex return size } func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint8(uint8(m.Type)) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *PolicerClassifyDump) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Type = PolicerClassifyTable(buf.DecodeUint8()) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // PolicerClassifySetInterface defines message 'policer_classify_set_interface'. type PolicerClassifySetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"` IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"` L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` } func (m *PolicerClassifySetInterface) Reset() { *m = PolicerClassifySetInterface{} } func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" } func (*PolicerClassifySetInterface) GetCrcString() string { return "de7ad708" } func (*PolicerClassifySetInterface) GetMessageType() api.MessageType { return api.RequestMessage } func (m *PolicerClassifySetInterface) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 4 // m.IP4TableIndex size += 4 // m.IP6TableIndex size += 4 // m.L2TableIndex size += 1 // m.IsAdd return size } func (m *PolicerClassifySetInterface) 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.IP4TableIndex) buf.EncodeUint32(m.IP6TableIndex) buf.EncodeUint32(m.L2TableIndex) buf.EncodeBool(m.IsAdd) return buf.Bytes(), nil } func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.IP4TableIndex = buf.DecodeUint32() m.IP6TableIndex = buf.DecodeUint32() m.L2TableIndex = buf.DecodeUint32() m.IsAdd = buf.DecodeBool() return nil } // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'. type PolicerClassifySetInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} } func (*PolicerClassifySetInterfaceReply) GetMessageName() string { return "policer_classify_set_interface_reply" } func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" } func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *PolicerClassifySetInterfaceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *PolicerClassifySetInterfaceReply) 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 *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } func init() { file_classify_binapi_init() } func file_classify_binapi_init() { api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0") 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((*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((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804") api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65") api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804") api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e") api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db") api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14") 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((*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((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804") api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708") api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804") api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708") api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804") api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765") 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") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ (*ClassifyAddDelSession)(nil), (*ClassifyAddDelSessionReply)(nil), (*ClassifyAddDelTable)(nil), (*ClassifyAddDelTableReply)(nil), (*ClassifySessionDetails)(nil), (*ClassifySessionDump)(nil), (*ClassifySetInterfaceIPTable)(nil), (*ClassifySetInterfaceIPTableReply)(nil), (*ClassifySetInterfaceL2Tables)(nil), (*ClassifySetInterfaceL2TablesReply)(nil), (*ClassifyTableByInterface)(nil), (*ClassifyTableByInterfaceReply)(nil), (*ClassifyTableIds)(nil), (*ClassifyTableIdsReply)(nil), (*ClassifyTableInfo)(nil), (*ClassifyTableInfoReply)(nil), (*FlowClassifyDetails)(nil), (*FlowClassifyDump)(nil), (*FlowClassifySetInterface)(nil), (*FlowClassifySetInterfaceReply)(nil), (*InputACLSetInterface)(nil), (*InputACLSetInterfaceReply)(nil), (*OutputACLSetInterface)(nil), (*OutputACLSetInterfaceReply)(nil), (*PolicerClassifyDetails)(nil), (*PolicerClassifyDump)(nil), (*PolicerClassifySetInterface)(nil), (*PolicerClassifySetInterfaceReply)(nil), } }