1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/classify.api.json
7 // Package classify contains generated bindings for API file classify.api.
16 api "git.fd.io/govpp.git/api"
17 interface_types "git.fd.io/govpp.git/binapi/interface_types"
18 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0x1298bdec
34 // ClassifyAction defines enum 'classify_action'.
35 type ClassifyAction uint8
38 CLASSIFY_API_ACTION_NONE ClassifyAction = 0
39 CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX ClassifyAction = 1
40 CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX ClassifyAction = 2
41 CLASSIFY_API_ACTION_SET_METADATA ClassifyAction = 3
45 ClassifyAction_name = map[uint8]string{
46 0: "CLASSIFY_API_ACTION_NONE",
47 1: "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX",
48 2: "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX",
49 3: "CLASSIFY_API_ACTION_SET_METADATA",
51 ClassifyAction_value = map[string]uint8{
52 "CLASSIFY_API_ACTION_NONE": 0,
53 "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX": 1,
54 "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX": 2,
55 "CLASSIFY_API_ACTION_SET_METADATA": 3,
59 func (x ClassifyAction) String() string {
60 s, ok := ClassifyAction_name[uint8(x)]
64 return "ClassifyAction(" + strconv.Itoa(int(x)) + ")"
67 // FlowClassifyTable defines enum 'flow_classify_table'.
68 type FlowClassifyTable uint8
71 FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 1
72 FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 2
76 FlowClassifyTable_name = map[uint8]string{
77 1: "FLOW_CLASSIFY_API_TABLE_IP4",
78 2: "FLOW_CLASSIFY_API_TABLE_IP6",
80 FlowClassifyTable_value = map[string]uint8{
81 "FLOW_CLASSIFY_API_TABLE_IP4": 1,
82 "FLOW_CLASSIFY_API_TABLE_IP6": 2,
86 func (x FlowClassifyTable) String() string {
87 s, ok := FlowClassifyTable_name[uint8(x)]
91 return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")"
94 // PolicerClassifyTable defines enum 'policer_classify_table'.
95 type PolicerClassifyTable uint8
98 POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1
99 POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2
100 POLICER_CLASSIFY_API_TABLE_L2 PolicerClassifyTable = 3
104 PolicerClassifyTable_name = map[uint8]string{
105 1: "POLICER_CLASSIFY_API_TABLE_IP4",
106 2: "POLICER_CLASSIFY_API_TABLE_IP6",
107 3: "POLICER_CLASSIFY_API_TABLE_L2",
109 PolicerClassifyTable_value = map[string]uint8{
110 "POLICER_CLASSIFY_API_TABLE_IP4": 1,
111 "POLICER_CLASSIFY_API_TABLE_IP6": 2,
112 "POLICER_CLASSIFY_API_TABLE_L2": 3,
116 func (x PolicerClassifyTable) String() string {
117 s, ok := PolicerClassifyTable_name[uint8(x)]
121 return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
124 // ClassifyAddDelSession defines message 'classify_add_del_session'.
125 type ClassifyAddDelSession struct {
126 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
127 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
128 HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=%!s(float64=4.294967295e+09)" json:"hit_next_index,omitempty"`
129 OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=%!s(float64=4.294967295e+09)" json:"opaque_index,omitempty"`
130 Advance int32 `binapi:"i32,name=advance,default=%!s(float64=0)" json:"advance,omitempty"`
131 Action ClassifyAction `binapi:"classify_action,name=action,default=%!s(float64=0)" json:"action,omitempty"`
132 Metadata uint32 `binapi:"u32,name=metadata,default=%!s(float64=0)" json:"metadata,omitempty"`
133 MatchLen uint32 `binapi:"u32,name=match_len" json:"-"`
134 Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"`
137 func (m *ClassifyAddDelSession) Reset() { *m = ClassifyAddDelSession{} }
138 func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" }
139 func (*ClassifyAddDelSession) GetCrcString() string { return "f20879f0" }
140 func (*ClassifyAddDelSession) GetMessageType() api.MessageType {
141 return api.RequestMessage
144 func (m *ClassifyAddDelSession) Size() int {
150 size += 4 // m.TableIndex
151 size += 4 // m.HitNextIndex
152 size += 4 // m.OpaqueIndex
153 size += 4 // m.Advance
154 size += 1 // m.Action
155 size += 4 // m.Metadata
156 size += 4 // m.MatchLen
157 size += 1 * len(m.Match) // m.Match
160 func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
161 var buf *codec.Buffer
163 buf = codec.NewBuffer(make([]byte, m.Size()))
165 buf = codec.NewBuffer(b)
167 buf.EncodeBool(m.IsAdd)
168 buf.EncodeUint32(uint32(m.TableIndex))
169 buf.EncodeUint32(uint32(m.HitNextIndex))
170 buf.EncodeUint32(uint32(m.OpaqueIndex))
171 buf.EncodeUint32(uint32(m.Advance))
172 buf.EncodeUint8(uint8(m.Action))
173 buf.EncodeUint32(uint32(m.Metadata))
174 buf.EncodeUint32(uint32(len(m.Match)))
175 buf.EncodeBytes(m.Match[:], 0)
176 return buf.Bytes(), nil
178 func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
179 buf := codec.NewBuffer(b)
180 m.IsAdd = buf.DecodeBool()
181 m.TableIndex = buf.DecodeUint32()
182 m.HitNextIndex = buf.DecodeUint32()
183 m.OpaqueIndex = buf.DecodeUint32()
184 m.Advance = int32(buf.DecodeUint32())
185 m.Action = ClassifyAction(buf.DecodeUint8())
186 m.Metadata = buf.DecodeUint32()
187 m.MatchLen = buf.DecodeUint32()
188 copy(m.Match[:], buf.DecodeBytes(0))
192 // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
193 type ClassifyAddDelSessionReply struct {
194 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
197 func (m *ClassifyAddDelSessionReply) Reset() { *m = ClassifyAddDelSessionReply{} }
198 func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
199 func (*ClassifyAddDelSessionReply) GetCrcString() string { return "e8d4e804" }
200 func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
201 return api.ReplyMessage
204 func (m *ClassifyAddDelSessionReply) Size() int {
209 size += 4 // m.Retval
212 func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
213 var buf *codec.Buffer
215 buf = codec.NewBuffer(make([]byte, m.Size()))
217 buf = codec.NewBuffer(b)
219 buf.EncodeUint32(uint32(m.Retval))
220 return buf.Bytes(), nil
222 func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
223 buf := codec.NewBuffer(b)
224 m.Retval = int32(buf.DecodeUint32())
228 // ClassifyAddDelTable defines message 'classify_add_del_table'.
229 type ClassifyAddDelTable struct {
230 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
231 DelChain bool `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
232 TableIndex uint32 `binapi:"u32,name=table_index,default=%!s(float64=4.294967295e+09)" json:"table_index,omitempty"`
233 Nbuckets uint32 `binapi:"u32,name=nbuckets,default=%!s(float64=2)" json:"nbuckets,omitempty"`
234 MemorySize uint32 `binapi:"u32,name=memory_size,default=%!s(float64=2.097152e+06)" json:"memory_size,omitempty"`
235 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=%!s(float64=0)" json:"skip_n_vectors,omitempty"`
236 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=%!s(float64=1)" json:"match_n_vectors,omitempty"`
237 NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=%!s(float64=4.294967295e+09)" json:"next_table_index,omitempty"`
238 MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=%!s(float64=4.294967295e+09)" json:"miss_next_index,omitempty"`
239 CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=%!s(float64=0)" json:"current_data_flag,omitempty"`
240 CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=%!s(float64=0)" json:"current_data_offset,omitempty"`
241 MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
242 Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
245 func (m *ClassifyAddDelTable) Reset() { *m = ClassifyAddDelTable{} }
246 func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
247 func (*ClassifyAddDelTable) GetCrcString() string { return "6849e39e" }
248 func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
249 return api.RequestMessage
252 func (m *ClassifyAddDelTable) Size() int {
258 size += 1 // m.DelChain
259 size += 4 // m.TableIndex
260 size += 4 // m.Nbuckets
261 size += 4 // m.MemorySize
262 size += 4 // m.SkipNVectors
263 size += 4 // m.MatchNVectors
264 size += 4 // m.NextTableIndex
265 size += 4 // m.MissNextIndex
266 size += 1 // m.CurrentDataFlag
267 size += 2 // m.CurrentDataOffset
268 size += 4 // m.MaskLen
269 size += 1 * len(m.Mask) // m.Mask
272 func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
273 var buf *codec.Buffer
275 buf = codec.NewBuffer(make([]byte, m.Size()))
277 buf = codec.NewBuffer(b)
279 buf.EncodeBool(m.IsAdd)
280 buf.EncodeBool(m.DelChain)
281 buf.EncodeUint32(uint32(m.TableIndex))
282 buf.EncodeUint32(uint32(m.Nbuckets))
283 buf.EncodeUint32(uint32(m.MemorySize))
284 buf.EncodeUint32(uint32(m.SkipNVectors))
285 buf.EncodeUint32(uint32(m.MatchNVectors))
286 buf.EncodeUint32(uint32(m.NextTableIndex))
287 buf.EncodeUint32(uint32(m.MissNextIndex))
288 buf.EncodeUint8(uint8(m.CurrentDataFlag))
289 buf.EncodeUint16(uint16(m.CurrentDataOffset))
290 buf.EncodeUint32(uint32(len(m.Mask)))
291 buf.EncodeBytes(m.Mask[:], 0)
292 return buf.Bytes(), nil
294 func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
295 buf := codec.NewBuffer(b)
296 m.IsAdd = buf.DecodeBool()
297 m.DelChain = buf.DecodeBool()
298 m.TableIndex = buf.DecodeUint32()
299 m.Nbuckets = buf.DecodeUint32()
300 m.MemorySize = buf.DecodeUint32()
301 m.SkipNVectors = buf.DecodeUint32()
302 m.MatchNVectors = buf.DecodeUint32()
303 m.NextTableIndex = buf.DecodeUint32()
304 m.MissNextIndex = buf.DecodeUint32()
305 m.CurrentDataFlag = buf.DecodeUint8()
306 m.CurrentDataOffset = int16(buf.DecodeUint16())
307 m.MaskLen = buf.DecodeUint32()
308 copy(m.Mask[:], buf.DecodeBytes(0))
312 // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
313 type ClassifyAddDelTableReply struct {
314 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
315 NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
316 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
317 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
320 func (m *ClassifyAddDelTableReply) Reset() { *m = ClassifyAddDelTableReply{} }
321 func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
322 func (*ClassifyAddDelTableReply) GetCrcString() string { return "05486349" }
323 func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
324 return api.ReplyMessage
327 func (m *ClassifyAddDelTableReply) Size() int {
332 size += 4 // m.Retval
333 size += 4 // m.NewTableIndex
334 size += 4 // m.SkipNVectors
335 size += 4 // m.MatchNVectors
338 func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
339 var buf *codec.Buffer
341 buf = codec.NewBuffer(make([]byte, m.Size()))
343 buf = codec.NewBuffer(b)
345 buf.EncodeUint32(uint32(m.Retval))
346 buf.EncodeUint32(uint32(m.NewTableIndex))
347 buf.EncodeUint32(uint32(m.SkipNVectors))
348 buf.EncodeUint32(uint32(m.MatchNVectors))
349 return buf.Bytes(), nil
351 func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
352 buf := codec.NewBuffer(b)
353 m.Retval = int32(buf.DecodeUint32())
354 m.NewTableIndex = buf.DecodeUint32()
355 m.SkipNVectors = buf.DecodeUint32()
356 m.MatchNVectors = buf.DecodeUint32()
360 // ClassifySessionDetails defines message 'classify_session_details'.
361 type ClassifySessionDetails struct {
362 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
363 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
364 HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
365 Advance int32 `binapi:"i32,name=advance" json:"advance,omitempty"`
366 OpaqueIndex uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
367 MatchLength uint32 `binapi:"u32,name=match_length" json:"-"`
368 Match []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
371 func (m *ClassifySessionDetails) Reset() { *m = ClassifySessionDetails{} }
372 func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
373 func (*ClassifySessionDetails) GetCrcString() string { return "60e3ef94" }
374 func (*ClassifySessionDetails) GetMessageType() api.MessageType {
375 return api.ReplyMessage
378 func (m *ClassifySessionDetails) Size() int {
383 size += 4 // m.Retval
384 size += 4 // m.TableID
385 size += 4 // m.HitNextIndex
386 size += 4 // m.Advance
387 size += 4 // m.OpaqueIndex
388 size += 4 // m.MatchLength
389 size += 1 * len(m.Match) // m.Match
392 func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
393 var buf *codec.Buffer
395 buf = codec.NewBuffer(make([]byte, m.Size()))
397 buf = codec.NewBuffer(b)
399 buf.EncodeUint32(uint32(m.Retval))
400 buf.EncodeUint32(uint32(m.TableID))
401 buf.EncodeUint32(uint32(m.HitNextIndex))
402 buf.EncodeUint32(uint32(m.Advance))
403 buf.EncodeUint32(uint32(m.OpaqueIndex))
404 buf.EncodeUint32(uint32(len(m.Match)))
405 buf.EncodeBytes(m.Match[:], 0)
406 return buf.Bytes(), nil
408 func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
409 buf := codec.NewBuffer(b)
410 m.Retval = int32(buf.DecodeUint32())
411 m.TableID = buf.DecodeUint32()
412 m.HitNextIndex = buf.DecodeUint32()
413 m.Advance = int32(buf.DecodeUint32())
414 m.OpaqueIndex = buf.DecodeUint32()
415 m.MatchLength = buf.DecodeUint32()
416 copy(m.Match[:], buf.DecodeBytes(0))
420 // ClassifySessionDump defines message 'classify_session_dump'.
421 type ClassifySessionDump struct {
422 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
425 func (m *ClassifySessionDump) Reset() { *m = ClassifySessionDump{} }
426 func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
427 func (*ClassifySessionDump) GetCrcString() string { return "0cca2cd9" }
428 func (*ClassifySessionDump) GetMessageType() api.MessageType {
429 return api.RequestMessage
432 func (m *ClassifySessionDump) Size() int {
437 size += 4 // m.TableID
440 func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
441 var buf *codec.Buffer
443 buf = codec.NewBuffer(make([]byte, m.Size()))
445 buf = codec.NewBuffer(b)
447 buf.EncodeUint32(uint32(m.TableID))
448 return buf.Bytes(), nil
450 func (m *ClassifySessionDump) Unmarshal(b []byte) error {
451 buf := codec.NewBuffer(b)
452 m.TableID = buf.DecodeUint32()
456 // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
457 type ClassifySetInterfaceIPTable struct {
458 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
459 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
460 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
463 func (m *ClassifySetInterfaceIPTable) Reset() { *m = ClassifySetInterfaceIPTable{} }
464 func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
465 func (*ClassifySetInterfaceIPTable) GetCrcString() string { return "e0b097c7" }
466 func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
467 return api.RequestMessage
470 func (m *ClassifySetInterfaceIPTable) Size() int {
475 size += 1 // m.IsIPv6
476 size += 4 // m.SwIfIndex
477 size += 4 // m.TableIndex
480 func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
481 var buf *codec.Buffer
483 buf = codec.NewBuffer(make([]byte, m.Size()))
485 buf = codec.NewBuffer(b)
487 buf.EncodeBool(m.IsIPv6)
488 buf.EncodeUint32(uint32(m.SwIfIndex))
489 buf.EncodeUint32(uint32(m.TableIndex))
490 return buf.Bytes(), nil
492 func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
493 buf := codec.NewBuffer(b)
494 m.IsIPv6 = buf.DecodeBool()
495 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
496 m.TableIndex = buf.DecodeUint32()
500 // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
501 type ClassifySetInterfaceIPTableReply struct {
502 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
505 func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
506 func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
507 return "classify_set_interface_ip_table_reply"
509 func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
510 func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
511 return api.ReplyMessage
514 func (m *ClassifySetInterfaceIPTableReply) Size() int {
519 size += 4 // m.Retval
522 func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
523 var buf *codec.Buffer
525 buf = codec.NewBuffer(make([]byte, m.Size()))
527 buf = codec.NewBuffer(b)
529 buf.EncodeUint32(uint32(m.Retval))
530 return buf.Bytes(), nil
532 func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
533 buf := codec.NewBuffer(b)
534 m.Retval = int32(buf.DecodeUint32())
538 // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
539 type ClassifySetInterfaceL2Tables struct {
540 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
541 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
542 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
543 OtherTableIndex uint32 `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
544 IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"`
547 func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
548 func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
549 return "classify_set_interface_l2_tables"
551 func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
552 func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
553 return api.RequestMessage
556 func (m *ClassifySetInterfaceL2Tables) Size() int {
561 size += 4 // m.SwIfIndex
562 size += 4 // m.IP4TableIndex
563 size += 4 // m.IP6TableIndex
564 size += 4 // m.OtherTableIndex
565 size += 1 // m.IsInput
568 func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
569 var buf *codec.Buffer
571 buf = codec.NewBuffer(make([]byte, m.Size()))
573 buf = codec.NewBuffer(b)
575 buf.EncodeUint32(uint32(m.SwIfIndex))
576 buf.EncodeUint32(uint32(m.IP4TableIndex))
577 buf.EncodeUint32(uint32(m.IP6TableIndex))
578 buf.EncodeUint32(uint32(m.OtherTableIndex))
579 buf.EncodeBool(m.IsInput)
580 return buf.Bytes(), nil
582 func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
583 buf := codec.NewBuffer(b)
584 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
585 m.IP4TableIndex = buf.DecodeUint32()
586 m.IP6TableIndex = buf.DecodeUint32()
587 m.OtherTableIndex = buf.DecodeUint32()
588 m.IsInput = buf.DecodeBool()
592 // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
593 type ClassifySetInterfaceL2TablesReply struct {
594 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
597 func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
598 func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
599 return "classify_set_interface_l2_tables_reply"
601 func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
602 func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
603 return api.ReplyMessage
606 func (m *ClassifySetInterfaceL2TablesReply) Size() int {
611 size += 4 // m.Retval
614 func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
615 var buf *codec.Buffer
617 buf = codec.NewBuffer(make([]byte, m.Size()))
619 buf = codec.NewBuffer(b)
621 buf.EncodeUint32(uint32(m.Retval))
622 return buf.Bytes(), nil
624 func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
625 buf := codec.NewBuffer(b)
626 m.Retval = int32(buf.DecodeUint32())
630 // ClassifyTableByInterface defines message 'classify_table_by_interface'.
631 type ClassifyTableByInterface struct {
632 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
635 func (m *ClassifyTableByInterface) Reset() { *m = ClassifyTableByInterface{} }
636 func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
637 func (*ClassifyTableByInterface) GetCrcString() string { return "f9e6675e" }
638 func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
639 return api.RequestMessage
642 func (m *ClassifyTableByInterface) Size() int {
647 size += 4 // m.SwIfIndex
650 func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
651 var buf *codec.Buffer
653 buf = codec.NewBuffer(make([]byte, m.Size()))
655 buf = codec.NewBuffer(b)
657 buf.EncodeUint32(uint32(m.SwIfIndex))
658 return buf.Bytes(), nil
660 func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
661 buf := codec.NewBuffer(b)
662 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
666 // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
667 type ClassifyTableByInterfaceReply struct {
668 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
669 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
670 L2TableID uint32 `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
671 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
672 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
675 func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
676 func (*ClassifyTableByInterfaceReply) GetMessageName() string {
677 return "classify_table_by_interface_reply"
679 func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
680 func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
681 return api.ReplyMessage
684 func (m *ClassifyTableByInterfaceReply) Size() int {
689 size += 4 // m.Retval
690 size += 4 // m.SwIfIndex
691 size += 4 // m.L2TableID
692 size += 4 // m.IP4TableID
693 size += 4 // m.IP6TableID
696 func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
697 var buf *codec.Buffer
699 buf = codec.NewBuffer(make([]byte, m.Size()))
701 buf = codec.NewBuffer(b)
703 buf.EncodeUint32(uint32(m.Retval))
704 buf.EncodeUint32(uint32(m.SwIfIndex))
705 buf.EncodeUint32(uint32(m.L2TableID))
706 buf.EncodeUint32(uint32(m.IP4TableID))
707 buf.EncodeUint32(uint32(m.IP6TableID))
708 return buf.Bytes(), nil
710 func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
711 buf := codec.NewBuffer(b)
712 m.Retval = int32(buf.DecodeUint32())
713 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
714 m.L2TableID = buf.DecodeUint32()
715 m.IP4TableID = buf.DecodeUint32()
716 m.IP6TableID = buf.DecodeUint32()
720 // ClassifyTableIds defines message 'classify_table_ids'.
721 type ClassifyTableIds struct{}
723 func (m *ClassifyTableIds) Reset() { *m = ClassifyTableIds{} }
724 func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
725 func (*ClassifyTableIds) GetCrcString() string { return "51077d14" }
726 func (*ClassifyTableIds) GetMessageType() api.MessageType {
727 return api.RequestMessage
730 func (m *ClassifyTableIds) Size() int {
737 func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
738 var buf *codec.Buffer
740 buf = codec.NewBuffer(make([]byte, m.Size()))
742 buf = codec.NewBuffer(b)
744 return buf.Bytes(), nil
746 func (m *ClassifyTableIds) Unmarshal(b []byte) error {
750 // ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
751 type ClassifyTableIdsReply struct {
752 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
753 Count uint32 `binapi:"u32,name=count" json:"-"`
754 Ids []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
757 func (m *ClassifyTableIdsReply) Reset() { *m = ClassifyTableIdsReply{} }
758 func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
759 func (*ClassifyTableIdsReply) GetCrcString() string { return "d1d20e1d" }
760 func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
761 return api.ReplyMessage
764 func (m *ClassifyTableIdsReply) Size() int {
769 size += 4 // m.Retval
771 size += 4 * len(m.Ids) // m.Ids
774 func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
775 var buf *codec.Buffer
777 buf = codec.NewBuffer(make([]byte, m.Size()))
779 buf = codec.NewBuffer(b)
781 buf.EncodeUint32(uint32(m.Retval))
782 buf.EncodeUint32(uint32(len(m.Ids)))
783 for i := 0; i < len(m.Ids); i++ {
788 buf.EncodeUint32(uint32(x))
790 return buf.Bytes(), nil
792 func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
793 buf := codec.NewBuffer(b)
794 m.Retval = int32(buf.DecodeUint32())
795 m.Count = buf.DecodeUint32()
796 m.Ids = make([]uint32, m.Count)
797 for i := 0; i < len(m.Ids); i++ {
798 m.Ids[i] = buf.DecodeUint32()
803 // ClassifyTableInfo defines message 'classify_table_info'.
804 type ClassifyTableInfo struct {
805 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
808 func (m *ClassifyTableInfo) Reset() { *m = ClassifyTableInfo{} }
809 func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
810 func (*ClassifyTableInfo) GetCrcString() string { return "0cca2cd9" }
811 func (*ClassifyTableInfo) GetMessageType() api.MessageType {
812 return api.RequestMessage
815 func (m *ClassifyTableInfo) Size() int {
820 size += 4 // m.TableID
823 func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
824 var buf *codec.Buffer
826 buf = codec.NewBuffer(make([]byte, m.Size()))
828 buf = codec.NewBuffer(b)
830 buf.EncodeUint32(uint32(m.TableID))
831 return buf.Bytes(), nil
833 func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
834 buf := codec.NewBuffer(b)
835 m.TableID = buf.DecodeUint32()
839 // ClassifyTableInfoReply defines message 'classify_table_info_reply'.
840 type ClassifyTableInfoReply struct {
841 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
842 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
843 Nbuckets uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
844 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
845 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
846 ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
847 NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
848 MissNextIndex uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
849 MaskLength uint32 `binapi:"u32,name=mask_length" json:"-"`
850 Mask []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
853 func (m *ClassifyTableInfoReply) Reset() { *m = ClassifyTableInfoReply{} }
854 func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
855 func (*ClassifyTableInfoReply) GetCrcString() string { return "4a573c0e" }
856 func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
857 return api.ReplyMessage
860 func (m *ClassifyTableInfoReply) Size() int {
865 size += 4 // m.Retval
866 size += 4 // m.TableID
867 size += 4 // m.Nbuckets
868 size += 4 // m.MatchNVectors
869 size += 4 // m.SkipNVectors
870 size += 4 // m.ActiveSessions
871 size += 4 // m.NextTableIndex
872 size += 4 // m.MissNextIndex
873 size += 4 // m.MaskLength
874 size += 1 * len(m.Mask) // m.Mask
877 func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
878 var buf *codec.Buffer
880 buf = codec.NewBuffer(make([]byte, m.Size()))
882 buf = codec.NewBuffer(b)
884 buf.EncodeUint32(uint32(m.Retval))
885 buf.EncodeUint32(uint32(m.TableID))
886 buf.EncodeUint32(uint32(m.Nbuckets))
887 buf.EncodeUint32(uint32(m.MatchNVectors))
888 buf.EncodeUint32(uint32(m.SkipNVectors))
889 buf.EncodeUint32(uint32(m.ActiveSessions))
890 buf.EncodeUint32(uint32(m.NextTableIndex))
891 buf.EncodeUint32(uint32(m.MissNextIndex))
892 buf.EncodeUint32(uint32(len(m.Mask)))
893 buf.EncodeBytes(m.Mask[:], 0)
894 return buf.Bytes(), nil
896 func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
897 buf := codec.NewBuffer(b)
898 m.Retval = int32(buf.DecodeUint32())
899 m.TableID = buf.DecodeUint32()
900 m.Nbuckets = buf.DecodeUint32()
901 m.MatchNVectors = buf.DecodeUint32()
902 m.SkipNVectors = buf.DecodeUint32()
903 m.ActiveSessions = buf.DecodeUint32()
904 m.NextTableIndex = buf.DecodeUint32()
905 m.MissNextIndex = buf.DecodeUint32()
906 m.MaskLength = buf.DecodeUint32()
907 copy(m.Mask[:], buf.DecodeBytes(0))
911 // FlowClassifyDetails defines message 'flow_classify_details'.
912 type FlowClassifyDetails struct {
913 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
914 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
917 func (m *FlowClassifyDetails) Reset() { *m = FlowClassifyDetails{} }
918 func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
919 func (*FlowClassifyDetails) GetCrcString() string { return "dfd08765" }
920 func (*FlowClassifyDetails) GetMessageType() api.MessageType {
921 return api.ReplyMessage
924 func (m *FlowClassifyDetails) Size() int {
929 size += 4 // m.SwIfIndex
930 size += 4 // m.TableIndex
933 func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
934 var buf *codec.Buffer
936 buf = codec.NewBuffer(make([]byte, m.Size()))
938 buf = codec.NewBuffer(b)
940 buf.EncodeUint32(uint32(m.SwIfIndex))
941 buf.EncodeUint32(uint32(m.TableIndex))
942 return buf.Bytes(), nil
944 func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
945 buf := codec.NewBuffer(b)
946 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
947 m.TableIndex = buf.DecodeUint32()
951 // FlowClassifyDump defines message 'flow_classify_dump'.
952 type FlowClassifyDump struct {
953 Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
954 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
957 func (m *FlowClassifyDump) Reset() { *m = FlowClassifyDump{} }
958 func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
959 func (*FlowClassifyDump) GetCrcString() string { return "8a6ad43d" }
960 func (*FlowClassifyDump) GetMessageType() api.MessageType {
961 return api.RequestMessage
964 func (m *FlowClassifyDump) Size() int {
970 size += 4 // m.SwIfIndex
973 func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
974 var buf *codec.Buffer
976 buf = codec.NewBuffer(make([]byte, m.Size()))
978 buf = codec.NewBuffer(b)
980 buf.EncodeUint8(uint8(m.Type))
981 buf.EncodeUint32(uint32(m.SwIfIndex))
982 return buf.Bytes(), nil
984 func (m *FlowClassifyDump) Unmarshal(b []byte) error {
985 buf := codec.NewBuffer(b)
986 m.Type = FlowClassifyTable(buf.DecodeUint8())
987 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
991 // FlowClassifySetInterface defines message 'flow_classify_set_interface'.
992 type FlowClassifySetInterface struct {
993 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
994 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
995 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
996 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
999 func (m *FlowClassifySetInterface) Reset() { *m = FlowClassifySetInterface{} }
1000 func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
1001 func (*FlowClassifySetInterface) GetCrcString() string { return "b6192f1c" }
1002 func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
1003 return api.RequestMessage
1006 func (m *FlowClassifySetInterface) Size() int {
1011 size += 4 // m.SwIfIndex
1012 size += 4 // m.IP4TableIndex
1013 size += 4 // m.IP6TableIndex
1014 size += 1 // m.IsAdd
1017 func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1018 var buf *codec.Buffer
1020 buf = codec.NewBuffer(make([]byte, m.Size()))
1022 buf = codec.NewBuffer(b)
1024 buf.EncodeUint32(uint32(m.SwIfIndex))
1025 buf.EncodeUint32(uint32(m.IP4TableIndex))
1026 buf.EncodeUint32(uint32(m.IP6TableIndex))
1027 buf.EncodeBool(m.IsAdd)
1028 return buf.Bytes(), nil
1030 func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
1031 buf := codec.NewBuffer(b)
1032 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1033 m.IP4TableIndex = buf.DecodeUint32()
1034 m.IP6TableIndex = buf.DecodeUint32()
1035 m.IsAdd = buf.DecodeBool()
1039 // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
1040 type FlowClassifySetInterfaceReply struct {
1041 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1044 func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
1045 func (*FlowClassifySetInterfaceReply) GetMessageName() string {
1046 return "flow_classify_set_interface_reply"
1048 func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1049 func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
1050 return api.ReplyMessage
1053 func (m *FlowClassifySetInterfaceReply) Size() int {
1058 size += 4 // m.Retval
1061 func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1062 var buf *codec.Buffer
1064 buf = codec.NewBuffer(make([]byte, m.Size()))
1066 buf = codec.NewBuffer(b)
1068 buf.EncodeUint32(uint32(m.Retval))
1069 return buf.Bytes(), nil
1071 func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
1072 buf := codec.NewBuffer(b)
1073 m.Retval = int32(buf.DecodeUint32())
1077 // InputACLSetInterface defines message 'input_acl_set_interface'.
1078 type InputACLSetInterface struct {
1079 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1080 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1081 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1082 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1083 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1086 func (m *InputACLSetInterface) Reset() { *m = InputACLSetInterface{} }
1087 func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
1088 func (*InputACLSetInterface) GetCrcString() string { return "de7ad708" }
1089 func (*InputACLSetInterface) GetMessageType() api.MessageType {
1090 return api.RequestMessage
1093 func (m *InputACLSetInterface) Size() int {
1098 size += 4 // m.SwIfIndex
1099 size += 4 // m.IP4TableIndex
1100 size += 4 // m.IP6TableIndex
1101 size += 4 // m.L2TableIndex
1102 size += 1 // m.IsAdd
1105 func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1106 var buf *codec.Buffer
1108 buf = codec.NewBuffer(make([]byte, m.Size()))
1110 buf = codec.NewBuffer(b)
1112 buf.EncodeUint32(uint32(m.SwIfIndex))
1113 buf.EncodeUint32(uint32(m.IP4TableIndex))
1114 buf.EncodeUint32(uint32(m.IP6TableIndex))
1115 buf.EncodeUint32(uint32(m.L2TableIndex))
1116 buf.EncodeBool(m.IsAdd)
1117 return buf.Bytes(), nil
1119 func (m *InputACLSetInterface) Unmarshal(b []byte) error {
1120 buf := codec.NewBuffer(b)
1121 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1122 m.IP4TableIndex = buf.DecodeUint32()
1123 m.IP6TableIndex = buf.DecodeUint32()
1124 m.L2TableIndex = buf.DecodeUint32()
1125 m.IsAdd = buf.DecodeBool()
1129 // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
1130 type InputACLSetInterfaceReply struct {
1131 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1134 func (m *InputACLSetInterfaceReply) Reset() { *m = InputACLSetInterfaceReply{} }
1135 func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
1136 func (*InputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1137 func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
1138 return api.ReplyMessage
1141 func (m *InputACLSetInterfaceReply) Size() int {
1146 size += 4 // m.Retval
1149 func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1150 var buf *codec.Buffer
1152 buf = codec.NewBuffer(make([]byte, m.Size()))
1154 buf = codec.NewBuffer(b)
1156 buf.EncodeUint32(uint32(m.Retval))
1157 return buf.Bytes(), nil
1159 func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
1160 buf := codec.NewBuffer(b)
1161 m.Retval = int32(buf.DecodeUint32())
1165 // OutputACLSetInterface defines message 'output_acl_set_interface'.
1166 type OutputACLSetInterface struct {
1167 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1168 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1169 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1170 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1171 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1174 func (m *OutputACLSetInterface) Reset() { *m = OutputACLSetInterface{} }
1175 func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
1176 func (*OutputACLSetInterface) GetCrcString() string { return "de7ad708" }
1177 func (*OutputACLSetInterface) GetMessageType() api.MessageType {
1178 return api.RequestMessage
1181 func (m *OutputACLSetInterface) Size() int {
1186 size += 4 // m.SwIfIndex
1187 size += 4 // m.IP4TableIndex
1188 size += 4 // m.IP6TableIndex
1189 size += 4 // m.L2TableIndex
1190 size += 1 // m.IsAdd
1193 func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1194 var buf *codec.Buffer
1196 buf = codec.NewBuffer(make([]byte, m.Size()))
1198 buf = codec.NewBuffer(b)
1200 buf.EncodeUint32(uint32(m.SwIfIndex))
1201 buf.EncodeUint32(uint32(m.IP4TableIndex))
1202 buf.EncodeUint32(uint32(m.IP6TableIndex))
1203 buf.EncodeUint32(uint32(m.L2TableIndex))
1204 buf.EncodeBool(m.IsAdd)
1205 return buf.Bytes(), nil
1207 func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
1208 buf := codec.NewBuffer(b)
1209 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1210 m.IP4TableIndex = buf.DecodeUint32()
1211 m.IP6TableIndex = buf.DecodeUint32()
1212 m.L2TableIndex = buf.DecodeUint32()
1213 m.IsAdd = buf.DecodeBool()
1217 // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
1218 type OutputACLSetInterfaceReply struct {
1219 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1222 func (m *OutputACLSetInterfaceReply) Reset() { *m = OutputACLSetInterfaceReply{} }
1223 func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
1224 func (*OutputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1225 func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
1226 return api.ReplyMessage
1229 func (m *OutputACLSetInterfaceReply) Size() int {
1234 size += 4 // m.Retval
1237 func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1238 var buf *codec.Buffer
1240 buf = codec.NewBuffer(make([]byte, m.Size()))
1242 buf = codec.NewBuffer(b)
1244 buf.EncodeUint32(uint32(m.Retval))
1245 return buf.Bytes(), nil
1247 func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
1248 buf := codec.NewBuffer(b)
1249 m.Retval = int32(buf.DecodeUint32())
1253 // PolicerClassifyDetails defines message 'policer_classify_details'.
1254 type PolicerClassifyDetails struct {
1255 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1256 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1259 func (m *PolicerClassifyDetails) Reset() { *m = PolicerClassifyDetails{} }
1260 func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
1261 func (*PolicerClassifyDetails) GetCrcString() string { return "dfd08765" }
1262 func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
1263 return api.ReplyMessage
1266 func (m *PolicerClassifyDetails) Size() int {
1271 size += 4 // m.SwIfIndex
1272 size += 4 // m.TableIndex
1275 func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
1276 var buf *codec.Buffer
1278 buf = codec.NewBuffer(make([]byte, m.Size()))
1280 buf = codec.NewBuffer(b)
1282 buf.EncodeUint32(uint32(m.SwIfIndex))
1283 buf.EncodeUint32(uint32(m.TableIndex))
1284 return buf.Bytes(), nil
1286 func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
1287 buf := codec.NewBuffer(b)
1288 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1289 m.TableIndex = buf.DecodeUint32()
1293 // PolicerClassifyDump defines message 'policer_classify_dump'.
1294 type PolicerClassifyDump struct {
1295 Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
1296 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1299 func (m *PolicerClassifyDump) Reset() { *m = PolicerClassifyDump{} }
1300 func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
1301 func (*PolicerClassifyDump) GetCrcString() string { return "6bfe6603" }
1302 func (*PolicerClassifyDump) GetMessageType() api.MessageType {
1303 return api.RequestMessage
1306 func (m *PolicerClassifyDump) Size() int {
1312 size += 4 // m.SwIfIndex
1315 func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
1316 var buf *codec.Buffer
1318 buf = codec.NewBuffer(make([]byte, m.Size()))
1320 buf = codec.NewBuffer(b)
1322 buf.EncodeUint8(uint8(m.Type))
1323 buf.EncodeUint32(uint32(m.SwIfIndex))
1324 return buf.Bytes(), nil
1326 func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
1327 buf := codec.NewBuffer(b)
1328 m.Type = PolicerClassifyTable(buf.DecodeUint8())
1329 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1333 // PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
1334 type PolicerClassifySetInterface struct {
1335 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1336 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1337 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1338 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1339 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1342 func (m *PolicerClassifySetInterface) Reset() { *m = PolicerClassifySetInterface{} }
1343 func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
1344 func (*PolicerClassifySetInterface) GetCrcString() string { return "de7ad708" }
1345 func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
1346 return api.RequestMessage
1349 func (m *PolicerClassifySetInterface) Size() int {
1354 size += 4 // m.SwIfIndex
1355 size += 4 // m.IP4TableIndex
1356 size += 4 // m.IP6TableIndex
1357 size += 4 // m.L2TableIndex
1358 size += 1 // m.IsAdd
1361 func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1362 var buf *codec.Buffer
1364 buf = codec.NewBuffer(make([]byte, m.Size()))
1366 buf = codec.NewBuffer(b)
1368 buf.EncodeUint32(uint32(m.SwIfIndex))
1369 buf.EncodeUint32(uint32(m.IP4TableIndex))
1370 buf.EncodeUint32(uint32(m.IP6TableIndex))
1371 buf.EncodeUint32(uint32(m.L2TableIndex))
1372 buf.EncodeBool(m.IsAdd)
1373 return buf.Bytes(), nil
1375 func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
1376 buf := codec.NewBuffer(b)
1377 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1378 m.IP4TableIndex = buf.DecodeUint32()
1379 m.IP6TableIndex = buf.DecodeUint32()
1380 m.L2TableIndex = buf.DecodeUint32()
1381 m.IsAdd = buf.DecodeBool()
1385 // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
1386 type PolicerClassifySetInterfaceReply struct {
1387 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1390 func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
1391 func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
1392 return "policer_classify_set_interface_reply"
1394 func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1395 func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
1396 return api.ReplyMessage
1399 func (m *PolicerClassifySetInterfaceReply) Size() int {
1404 size += 4 // m.Retval
1407 func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1408 var buf *codec.Buffer
1410 buf = codec.NewBuffer(make([]byte, m.Size()))
1412 buf = codec.NewBuffer(b)
1414 buf.EncodeUint32(uint32(m.Retval))
1415 return buf.Bytes(), nil
1417 func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
1418 buf := codec.NewBuffer(b)
1419 m.Retval = int32(buf.DecodeUint32())
1423 func init() { file_classify_binapi_init() }
1424 func file_classify_binapi_init() {
1425 api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
1426 api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
1427 api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
1428 api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
1429 api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
1430 api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
1431 api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
1432 api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
1433 api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
1434 api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
1435 api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
1436 api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
1437 api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
1438 api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
1439 api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
1440 api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
1441 api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
1442 api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
1443 api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
1444 api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
1445 api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
1446 api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
1447 api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
1448 api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
1449 api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
1450 api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
1451 api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
1452 api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
1455 // Messages returns list of all messages in this module.
1456 func AllMessages() []api.Message {
1457 return []api.Message{
1458 (*ClassifyAddDelSession)(nil),
1459 (*ClassifyAddDelSessionReply)(nil),
1460 (*ClassifyAddDelTable)(nil),
1461 (*ClassifyAddDelTableReply)(nil),
1462 (*ClassifySessionDetails)(nil),
1463 (*ClassifySessionDump)(nil),
1464 (*ClassifySetInterfaceIPTable)(nil),
1465 (*ClassifySetInterfaceIPTableReply)(nil),
1466 (*ClassifySetInterfaceL2Tables)(nil),
1467 (*ClassifySetInterfaceL2TablesReply)(nil),
1468 (*ClassifyTableByInterface)(nil),
1469 (*ClassifyTableByInterfaceReply)(nil),
1470 (*ClassifyTableIds)(nil),
1471 (*ClassifyTableIdsReply)(nil),
1472 (*ClassifyTableInfo)(nil),
1473 (*ClassifyTableInfoReply)(nil),
1474 (*FlowClassifyDetails)(nil),
1475 (*FlowClassifyDump)(nil),
1476 (*FlowClassifySetInterface)(nil),
1477 (*FlowClassifySetInterfaceReply)(nil),
1478 (*InputACLSetInterface)(nil),
1479 (*InputACLSetInterfaceReply)(nil),
1480 (*OutputACLSetInterface)(nil),
1481 (*OutputACLSetInterfaceReply)(nil),
1482 (*PolicerClassifyDetails)(nil),
1483 (*PolicerClassifyDump)(nil),
1484 (*PolicerClassifySetInterface)(nil),
1485 (*PolicerClassifySetInterfaceReply)(nil),