373e25695d38d66e82a352acf400398284c9401d
[govpp.git] / binapi / classify / classify.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5
6 // Package classify contains generated bindings for API file classify.api.
7 //
8 // Contents:
9 //   3 enums
10 //  28 messages
11 //
12 package classify
13
14 import (
15         "strconv"
16
17         api "git.fd.io/govpp.git/api"
18         interface_types "git.fd.io/govpp.git/binapi/interface_types"
19         codec "git.fd.io/govpp.git/codec"
20 )
21
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
27
28 const (
29         APIFile    = "classify"
30         APIVersion = "3.0.0"
31         VersionCrc = 0x1298bdec
32 )
33
34 // ClassifyAction defines enum 'classify_action'.
35 type ClassifyAction uint8
36
37 const (
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
42 )
43
44 var (
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",
50         }
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,
56         }
57 )
58
59 func (x ClassifyAction) String() string {
60         s, ok := ClassifyAction_name[uint8(x)]
61         if ok {
62                 return s
63         }
64         return "ClassifyAction(" + strconv.Itoa(int(x)) + ")"
65 }
66
67 // FlowClassifyTable defines enum 'flow_classify_table'.
68 type FlowClassifyTable uint8
69
70 const (
71         FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 1
72         FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 2
73 )
74
75 var (
76         FlowClassifyTable_name = map[uint8]string{
77                 1: "FLOW_CLASSIFY_API_TABLE_IP4",
78                 2: "FLOW_CLASSIFY_API_TABLE_IP6",
79         }
80         FlowClassifyTable_value = map[string]uint8{
81                 "FLOW_CLASSIFY_API_TABLE_IP4": 1,
82                 "FLOW_CLASSIFY_API_TABLE_IP6": 2,
83         }
84 )
85
86 func (x FlowClassifyTable) String() string {
87         s, ok := FlowClassifyTable_name[uint8(x)]
88         if ok {
89                 return s
90         }
91         return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")"
92 }
93
94 // PolicerClassifyTable defines enum 'policer_classify_table'.
95 type PolicerClassifyTable uint8
96
97 const (
98         POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1
99         POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2
100         POLICER_CLASSIFY_API_TABLE_L2  PolicerClassifyTable = 3
101 )
102
103 var (
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",
108         }
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,
113         }
114 )
115
116 func (x PolicerClassifyTable) String() string {
117         s, ok := PolicerClassifyTable_name[uint8(x)]
118         if ok {
119                 return s
120         }
121         return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
122 }
123
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=4294967295" json:"hit_next_index,omitempty"`
129         OpaqueIndex  uint32         `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
130         Advance      int32          `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
131         Action       ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
132         Metadata     uint32         `binapi:"u32,name=metadata,default=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"`
135 }
136
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
142 }
143
144 func (m *ClassifyAddDelSession) Size() (size int) {
145         if m == nil {
146                 return 0
147         }
148         size += 1                // m.IsAdd
149         size += 4                // m.TableIndex
150         size += 4                // m.HitNextIndex
151         size += 4                // m.OpaqueIndex
152         size += 4                // m.Advance
153         size += 1                // m.Action
154         size += 4                // m.Metadata
155         size += 4                // m.MatchLen
156         size += 1 * len(m.Match) // m.Match
157         return size
158 }
159 func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
160         if b == nil {
161                 b = make([]byte, m.Size())
162         }
163         buf := codec.NewBuffer(b)
164         buf.EncodeBool(m.IsAdd)
165         buf.EncodeUint32(m.TableIndex)
166         buf.EncodeUint32(m.HitNextIndex)
167         buf.EncodeUint32(m.OpaqueIndex)
168         buf.EncodeInt32(m.Advance)
169         buf.EncodeUint8(uint8(m.Action))
170         buf.EncodeUint32(m.Metadata)
171         buf.EncodeUint32(uint32(len(m.Match)))
172         buf.EncodeBytes(m.Match, 0)
173         return buf.Bytes(), nil
174 }
175 func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
176         buf := codec.NewBuffer(b)
177         m.IsAdd = buf.DecodeBool()
178         m.TableIndex = buf.DecodeUint32()
179         m.HitNextIndex = buf.DecodeUint32()
180         m.OpaqueIndex = buf.DecodeUint32()
181         m.Advance = buf.DecodeInt32()
182         m.Action = ClassifyAction(buf.DecodeUint8())
183         m.Metadata = buf.DecodeUint32()
184         m.MatchLen = buf.DecodeUint32()
185         m.Match = make([]byte, m.MatchLen)
186         copy(m.Match, buf.DecodeBytes(len(m.Match)))
187         return nil
188 }
189
190 // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
191 type ClassifyAddDelSessionReply struct {
192         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
193 }
194
195 func (m *ClassifyAddDelSessionReply) Reset()               { *m = ClassifyAddDelSessionReply{} }
196 func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
197 func (*ClassifyAddDelSessionReply) GetCrcString() string   { return "e8d4e804" }
198 func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
199         return api.ReplyMessage
200 }
201
202 func (m *ClassifyAddDelSessionReply) Size() (size int) {
203         if m == nil {
204                 return 0
205         }
206         size += 4 // m.Retval
207         return size
208 }
209 func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
210         if b == nil {
211                 b = make([]byte, m.Size())
212         }
213         buf := codec.NewBuffer(b)
214         buf.EncodeInt32(m.Retval)
215         return buf.Bytes(), nil
216 }
217 func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
218         buf := codec.NewBuffer(b)
219         m.Retval = buf.DecodeInt32()
220         return nil
221 }
222
223 // ClassifyAddDelTable defines message 'classify_add_del_table'.
224 type ClassifyAddDelTable struct {
225         IsAdd             bool   `binapi:"bool,name=is_add" json:"is_add,omitempty"`
226         DelChain          bool   `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
227         TableIndex        uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
228         Nbuckets          uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
229         MemorySize        uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
230         SkipNVectors      uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
231         MatchNVectors     uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
232         NextTableIndex    uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
233         MissNextIndex     uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
234         CurrentDataFlag   uint8  `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
235         CurrentDataOffset int16  `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
236         MaskLen           uint32 `binapi:"u32,name=mask_len" json:"-"`
237         Mask              []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
238 }
239
240 func (m *ClassifyAddDelTable) Reset()               { *m = ClassifyAddDelTable{} }
241 func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
242 func (*ClassifyAddDelTable) GetCrcString() string   { return "6849e39e" }
243 func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
244         return api.RequestMessage
245 }
246
247 func (m *ClassifyAddDelTable) Size() (size int) {
248         if m == nil {
249                 return 0
250         }
251         size += 1               // m.IsAdd
252         size += 1               // m.DelChain
253         size += 4               // m.TableIndex
254         size += 4               // m.Nbuckets
255         size += 4               // m.MemorySize
256         size += 4               // m.SkipNVectors
257         size += 4               // m.MatchNVectors
258         size += 4               // m.NextTableIndex
259         size += 4               // m.MissNextIndex
260         size += 1               // m.CurrentDataFlag
261         size += 2               // m.CurrentDataOffset
262         size += 4               // m.MaskLen
263         size += 1 * len(m.Mask) // m.Mask
264         return size
265 }
266 func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
267         if b == nil {
268                 b = make([]byte, m.Size())
269         }
270         buf := codec.NewBuffer(b)
271         buf.EncodeBool(m.IsAdd)
272         buf.EncodeBool(m.DelChain)
273         buf.EncodeUint32(m.TableIndex)
274         buf.EncodeUint32(m.Nbuckets)
275         buf.EncodeUint32(m.MemorySize)
276         buf.EncodeUint32(m.SkipNVectors)
277         buf.EncodeUint32(m.MatchNVectors)
278         buf.EncodeUint32(m.NextTableIndex)
279         buf.EncodeUint32(m.MissNextIndex)
280         buf.EncodeUint8(m.CurrentDataFlag)
281         buf.EncodeInt16(m.CurrentDataOffset)
282         buf.EncodeUint32(uint32(len(m.Mask)))
283         buf.EncodeBytes(m.Mask, 0)
284         return buf.Bytes(), nil
285 }
286 func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
287         buf := codec.NewBuffer(b)
288         m.IsAdd = buf.DecodeBool()
289         m.DelChain = buf.DecodeBool()
290         m.TableIndex = buf.DecodeUint32()
291         m.Nbuckets = buf.DecodeUint32()
292         m.MemorySize = buf.DecodeUint32()
293         m.SkipNVectors = buf.DecodeUint32()
294         m.MatchNVectors = buf.DecodeUint32()
295         m.NextTableIndex = buf.DecodeUint32()
296         m.MissNextIndex = buf.DecodeUint32()
297         m.CurrentDataFlag = buf.DecodeUint8()
298         m.CurrentDataOffset = buf.DecodeInt16()
299         m.MaskLen = buf.DecodeUint32()
300         m.Mask = make([]byte, m.MaskLen)
301         copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
302         return nil
303 }
304
305 // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
306 type ClassifyAddDelTableReply struct {
307         Retval        int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
308         NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
309         SkipNVectors  uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
310         MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
311 }
312
313 func (m *ClassifyAddDelTableReply) Reset()               { *m = ClassifyAddDelTableReply{} }
314 func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
315 func (*ClassifyAddDelTableReply) GetCrcString() string   { return "05486349" }
316 func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
317         return api.ReplyMessage
318 }
319
320 func (m *ClassifyAddDelTableReply) Size() (size int) {
321         if m == nil {
322                 return 0
323         }
324         size += 4 // m.Retval
325         size += 4 // m.NewTableIndex
326         size += 4 // m.SkipNVectors
327         size += 4 // m.MatchNVectors
328         return size
329 }
330 func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
331         if b == nil {
332                 b = make([]byte, m.Size())
333         }
334         buf := codec.NewBuffer(b)
335         buf.EncodeInt32(m.Retval)
336         buf.EncodeUint32(m.NewTableIndex)
337         buf.EncodeUint32(m.SkipNVectors)
338         buf.EncodeUint32(m.MatchNVectors)
339         return buf.Bytes(), nil
340 }
341 func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
342         buf := codec.NewBuffer(b)
343         m.Retval = buf.DecodeInt32()
344         m.NewTableIndex = buf.DecodeUint32()
345         m.SkipNVectors = buf.DecodeUint32()
346         m.MatchNVectors = buf.DecodeUint32()
347         return nil
348 }
349
350 // ClassifySessionDetails defines message 'classify_session_details'.
351 type ClassifySessionDetails struct {
352         Retval       int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
353         TableID      uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
354         HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
355         Advance      int32  `binapi:"i32,name=advance" json:"advance,omitempty"`
356         OpaqueIndex  uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
357         MatchLength  uint32 `binapi:"u32,name=match_length" json:"-"`
358         Match        []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
359 }
360
361 func (m *ClassifySessionDetails) Reset()               { *m = ClassifySessionDetails{} }
362 func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
363 func (*ClassifySessionDetails) GetCrcString() string   { return "60e3ef94" }
364 func (*ClassifySessionDetails) GetMessageType() api.MessageType {
365         return api.ReplyMessage
366 }
367
368 func (m *ClassifySessionDetails) Size() (size int) {
369         if m == nil {
370                 return 0
371         }
372         size += 4                // m.Retval
373         size += 4                // m.TableID
374         size += 4                // m.HitNextIndex
375         size += 4                // m.Advance
376         size += 4                // m.OpaqueIndex
377         size += 4                // m.MatchLength
378         size += 1 * len(m.Match) // m.Match
379         return size
380 }
381 func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
382         if b == nil {
383                 b = make([]byte, m.Size())
384         }
385         buf := codec.NewBuffer(b)
386         buf.EncodeInt32(m.Retval)
387         buf.EncodeUint32(m.TableID)
388         buf.EncodeUint32(m.HitNextIndex)
389         buf.EncodeInt32(m.Advance)
390         buf.EncodeUint32(m.OpaqueIndex)
391         buf.EncodeUint32(uint32(len(m.Match)))
392         buf.EncodeBytes(m.Match, 0)
393         return buf.Bytes(), nil
394 }
395 func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
396         buf := codec.NewBuffer(b)
397         m.Retval = buf.DecodeInt32()
398         m.TableID = buf.DecodeUint32()
399         m.HitNextIndex = buf.DecodeUint32()
400         m.Advance = buf.DecodeInt32()
401         m.OpaqueIndex = buf.DecodeUint32()
402         m.MatchLength = buf.DecodeUint32()
403         m.Match = make([]byte, m.MatchLength)
404         copy(m.Match, buf.DecodeBytes(len(m.Match)))
405         return nil
406 }
407
408 // ClassifySessionDump defines message 'classify_session_dump'.
409 type ClassifySessionDump struct {
410         TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
411 }
412
413 func (m *ClassifySessionDump) Reset()               { *m = ClassifySessionDump{} }
414 func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
415 func (*ClassifySessionDump) GetCrcString() string   { return "0cca2cd9" }
416 func (*ClassifySessionDump) GetMessageType() api.MessageType {
417         return api.RequestMessage
418 }
419
420 func (m *ClassifySessionDump) Size() (size int) {
421         if m == nil {
422                 return 0
423         }
424         size += 4 // m.TableID
425         return size
426 }
427 func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
428         if b == nil {
429                 b = make([]byte, m.Size())
430         }
431         buf := codec.NewBuffer(b)
432         buf.EncodeUint32(m.TableID)
433         return buf.Bytes(), nil
434 }
435 func (m *ClassifySessionDump) Unmarshal(b []byte) error {
436         buf := codec.NewBuffer(b)
437         m.TableID = buf.DecodeUint32()
438         return nil
439 }
440
441 // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
442 type ClassifySetInterfaceIPTable struct {
443         IsIPv6     bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
444         SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
445         TableIndex uint32                         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
446 }
447
448 func (m *ClassifySetInterfaceIPTable) Reset()               { *m = ClassifySetInterfaceIPTable{} }
449 func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
450 func (*ClassifySetInterfaceIPTable) GetCrcString() string   { return "e0b097c7" }
451 func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
452         return api.RequestMessage
453 }
454
455 func (m *ClassifySetInterfaceIPTable) Size() (size int) {
456         if m == nil {
457                 return 0
458         }
459         size += 1 // m.IsIPv6
460         size += 4 // m.SwIfIndex
461         size += 4 // m.TableIndex
462         return size
463 }
464 func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
465         if b == nil {
466                 b = make([]byte, m.Size())
467         }
468         buf := codec.NewBuffer(b)
469         buf.EncodeBool(m.IsIPv6)
470         buf.EncodeUint32(uint32(m.SwIfIndex))
471         buf.EncodeUint32(m.TableIndex)
472         return buf.Bytes(), nil
473 }
474 func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
475         buf := codec.NewBuffer(b)
476         m.IsIPv6 = buf.DecodeBool()
477         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
478         m.TableIndex = buf.DecodeUint32()
479         return nil
480 }
481
482 // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
483 type ClassifySetInterfaceIPTableReply struct {
484         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
485 }
486
487 func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
488 func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
489         return "classify_set_interface_ip_table_reply"
490 }
491 func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
492 func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
493         return api.ReplyMessage
494 }
495
496 func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
497         if m == nil {
498                 return 0
499         }
500         size += 4 // m.Retval
501         return size
502 }
503 func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
504         if b == nil {
505                 b = make([]byte, m.Size())
506         }
507         buf := codec.NewBuffer(b)
508         buf.EncodeInt32(m.Retval)
509         return buf.Bytes(), nil
510 }
511 func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
512         buf := codec.NewBuffer(b)
513         m.Retval = buf.DecodeInt32()
514         return nil
515 }
516
517 // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
518 type ClassifySetInterfaceL2Tables struct {
519         SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
520         IP4TableIndex   uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
521         IP6TableIndex   uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
522         OtherTableIndex uint32                         `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
523         IsInput         bool                           `binapi:"bool,name=is_input" json:"is_input,omitempty"`
524 }
525
526 func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
527 func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
528         return "classify_set_interface_l2_tables"
529 }
530 func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
531 func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
532         return api.RequestMessage
533 }
534
535 func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
536         if m == nil {
537                 return 0
538         }
539         size += 4 // m.SwIfIndex
540         size += 4 // m.IP4TableIndex
541         size += 4 // m.IP6TableIndex
542         size += 4 // m.OtherTableIndex
543         size += 1 // m.IsInput
544         return size
545 }
546 func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
547         if b == nil {
548                 b = make([]byte, m.Size())
549         }
550         buf := codec.NewBuffer(b)
551         buf.EncodeUint32(uint32(m.SwIfIndex))
552         buf.EncodeUint32(m.IP4TableIndex)
553         buf.EncodeUint32(m.IP6TableIndex)
554         buf.EncodeUint32(m.OtherTableIndex)
555         buf.EncodeBool(m.IsInput)
556         return buf.Bytes(), nil
557 }
558 func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
559         buf := codec.NewBuffer(b)
560         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
561         m.IP4TableIndex = buf.DecodeUint32()
562         m.IP6TableIndex = buf.DecodeUint32()
563         m.OtherTableIndex = buf.DecodeUint32()
564         m.IsInput = buf.DecodeBool()
565         return nil
566 }
567
568 // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
569 type ClassifySetInterfaceL2TablesReply struct {
570         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
571 }
572
573 func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
574 func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
575         return "classify_set_interface_l2_tables_reply"
576 }
577 func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
578 func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
579         return api.ReplyMessage
580 }
581
582 func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
583         if m == nil {
584                 return 0
585         }
586         size += 4 // m.Retval
587         return size
588 }
589 func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
590         if b == nil {
591                 b = make([]byte, m.Size())
592         }
593         buf := codec.NewBuffer(b)
594         buf.EncodeInt32(m.Retval)
595         return buf.Bytes(), nil
596 }
597 func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
598         buf := codec.NewBuffer(b)
599         m.Retval = buf.DecodeInt32()
600         return nil
601 }
602
603 // ClassifyTableByInterface defines message 'classify_table_by_interface'.
604 type ClassifyTableByInterface struct {
605         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
606 }
607
608 func (m *ClassifyTableByInterface) Reset()               { *m = ClassifyTableByInterface{} }
609 func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
610 func (*ClassifyTableByInterface) GetCrcString() string   { return "f9e6675e" }
611 func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
612         return api.RequestMessage
613 }
614
615 func (m *ClassifyTableByInterface) Size() (size int) {
616         if m == nil {
617                 return 0
618         }
619         size += 4 // m.SwIfIndex
620         return size
621 }
622 func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
623         if b == nil {
624                 b = make([]byte, m.Size())
625         }
626         buf := codec.NewBuffer(b)
627         buf.EncodeUint32(uint32(m.SwIfIndex))
628         return buf.Bytes(), nil
629 }
630 func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
631         buf := codec.NewBuffer(b)
632         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
633         return nil
634 }
635
636 // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
637 type ClassifyTableByInterfaceReply struct {
638         Retval     int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
639         SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
640         L2TableID  uint32                         `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
641         IP4TableID uint32                         `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
642         IP6TableID uint32                         `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
643 }
644
645 func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
646 func (*ClassifyTableByInterfaceReply) GetMessageName() string {
647         return "classify_table_by_interface_reply"
648 }
649 func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
650 func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
651         return api.ReplyMessage
652 }
653
654 func (m *ClassifyTableByInterfaceReply) Size() (size int) {
655         if m == nil {
656                 return 0
657         }
658         size += 4 // m.Retval
659         size += 4 // m.SwIfIndex
660         size += 4 // m.L2TableID
661         size += 4 // m.IP4TableID
662         size += 4 // m.IP6TableID
663         return size
664 }
665 func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
666         if b == nil {
667                 b = make([]byte, m.Size())
668         }
669         buf := codec.NewBuffer(b)
670         buf.EncodeInt32(m.Retval)
671         buf.EncodeUint32(uint32(m.SwIfIndex))
672         buf.EncodeUint32(m.L2TableID)
673         buf.EncodeUint32(m.IP4TableID)
674         buf.EncodeUint32(m.IP6TableID)
675         return buf.Bytes(), nil
676 }
677 func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
678         buf := codec.NewBuffer(b)
679         m.Retval = buf.DecodeInt32()
680         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
681         m.L2TableID = buf.DecodeUint32()
682         m.IP4TableID = buf.DecodeUint32()
683         m.IP6TableID = buf.DecodeUint32()
684         return nil
685 }
686
687 // ClassifyTableIds defines message 'classify_table_ids'.
688 type ClassifyTableIds struct{}
689
690 func (m *ClassifyTableIds) Reset()               { *m = ClassifyTableIds{} }
691 func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
692 func (*ClassifyTableIds) GetCrcString() string   { return "51077d14" }
693 func (*ClassifyTableIds) GetMessageType() api.MessageType {
694         return api.RequestMessage
695 }
696
697 func (m *ClassifyTableIds) Size() (size int) {
698         if m == nil {
699                 return 0
700         }
701         return size
702 }
703 func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
704         if b == nil {
705                 b = make([]byte, m.Size())
706         }
707         buf := codec.NewBuffer(b)
708         return buf.Bytes(), nil
709 }
710 func (m *ClassifyTableIds) Unmarshal(b []byte) error {
711         return nil
712 }
713
714 // ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
715 type ClassifyTableIdsReply struct {
716         Retval int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
717         Count  uint32   `binapi:"u32,name=count" json:"-"`
718         Ids    []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
719 }
720
721 func (m *ClassifyTableIdsReply) Reset()               { *m = ClassifyTableIdsReply{} }
722 func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
723 func (*ClassifyTableIdsReply) GetCrcString() string   { return "d1d20e1d" }
724 func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
725         return api.ReplyMessage
726 }
727
728 func (m *ClassifyTableIdsReply) Size() (size int) {
729         if m == nil {
730                 return 0
731         }
732         size += 4              // m.Retval
733         size += 4              // m.Count
734         size += 4 * len(m.Ids) // m.Ids
735         return size
736 }
737 func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
738         if b == nil {
739                 b = make([]byte, m.Size())
740         }
741         buf := codec.NewBuffer(b)
742         buf.EncodeInt32(m.Retval)
743         buf.EncodeUint32(uint32(len(m.Ids)))
744         for i := 0; i < len(m.Ids); i++ {
745                 var x uint32
746                 if i < len(m.Ids) {
747                         x = uint32(m.Ids[i])
748                 }
749                 buf.EncodeUint32(x)
750         }
751         return buf.Bytes(), nil
752 }
753 func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
754         buf := codec.NewBuffer(b)
755         m.Retval = buf.DecodeInt32()
756         m.Count = buf.DecodeUint32()
757         m.Ids = make([]uint32, m.Count)
758         for i := 0; i < len(m.Ids); i++ {
759                 m.Ids[i] = buf.DecodeUint32()
760         }
761         return nil
762 }
763
764 // ClassifyTableInfo defines message 'classify_table_info'.
765 type ClassifyTableInfo struct {
766         TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
767 }
768
769 func (m *ClassifyTableInfo) Reset()               { *m = ClassifyTableInfo{} }
770 func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
771 func (*ClassifyTableInfo) GetCrcString() string   { return "0cca2cd9" }
772 func (*ClassifyTableInfo) GetMessageType() api.MessageType {
773         return api.RequestMessage
774 }
775
776 func (m *ClassifyTableInfo) Size() (size int) {
777         if m == nil {
778                 return 0
779         }
780         size += 4 // m.TableID
781         return size
782 }
783 func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
784         if b == nil {
785                 b = make([]byte, m.Size())
786         }
787         buf := codec.NewBuffer(b)
788         buf.EncodeUint32(m.TableID)
789         return buf.Bytes(), nil
790 }
791 func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
792         buf := codec.NewBuffer(b)
793         m.TableID = buf.DecodeUint32()
794         return nil
795 }
796
797 // ClassifyTableInfoReply defines message 'classify_table_info_reply'.
798 type ClassifyTableInfoReply struct {
799         Retval         int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
800         TableID        uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
801         Nbuckets       uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
802         MatchNVectors  uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
803         SkipNVectors   uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
804         ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
805         NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
806         MissNextIndex  uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
807         MaskLength     uint32 `binapi:"u32,name=mask_length" json:"-"`
808         Mask           []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
809 }
810
811 func (m *ClassifyTableInfoReply) Reset()               { *m = ClassifyTableInfoReply{} }
812 func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
813 func (*ClassifyTableInfoReply) GetCrcString() string   { return "4a573c0e" }
814 func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
815         return api.ReplyMessage
816 }
817
818 func (m *ClassifyTableInfoReply) Size() (size int) {
819         if m == nil {
820                 return 0
821         }
822         size += 4               // m.Retval
823         size += 4               // m.TableID
824         size += 4               // m.Nbuckets
825         size += 4               // m.MatchNVectors
826         size += 4               // m.SkipNVectors
827         size += 4               // m.ActiveSessions
828         size += 4               // m.NextTableIndex
829         size += 4               // m.MissNextIndex
830         size += 4               // m.MaskLength
831         size += 1 * len(m.Mask) // m.Mask
832         return size
833 }
834 func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
835         if b == nil {
836                 b = make([]byte, m.Size())
837         }
838         buf := codec.NewBuffer(b)
839         buf.EncodeInt32(m.Retval)
840         buf.EncodeUint32(m.TableID)
841         buf.EncodeUint32(m.Nbuckets)
842         buf.EncodeUint32(m.MatchNVectors)
843         buf.EncodeUint32(m.SkipNVectors)
844         buf.EncodeUint32(m.ActiveSessions)
845         buf.EncodeUint32(m.NextTableIndex)
846         buf.EncodeUint32(m.MissNextIndex)
847         buf.EncodeUint32(uint32(len(m.Mask)))
848         buf.EncodeBytes(m.Mask, 0)
849         return buf.Bytes(), nil
850 }
851 func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
852         buf := codec.NewBuffer(b)
853         m.Retval = buf.DecodeInt32()
854         m.TableID = buf.DecodeUint32()
855         m.Nbuckets = buf.DecodeUint32()
856         m.MatchNVectors = buf.DecodeUint32()
857         m.SkipNVectors = buf.DecodeUint32()
858         m.ActiveSessions = buf.DecodeUint32()
859         m.NextTableIndex = buf.DecodeUint32()
860         m.MissNextIndex = buf.DecodeUint32()
861         m.MaskLength = buf.DecodeUint32()
862         m.Mask = make([]byte, m.MaskLength)
863         copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
864         return nil
865 }
866
867 // FlowClassifyDetails defines message 'flow_classify_details'.
868 type FlowClassifyDetails struct {
869         SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
870         TableIndex uint32                         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
871 }
872
873 func (m *FlowClassifyDetails) Reset()               { *m = FlowClassifyDetails{} }
874 func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
875 func (*FlowClassifyDetails) GetCrcString() string   { return "dfd08765" }
876 func (*FlowClassifyDetails) GetMessageType() api.MessageType {
877         return api.ReplyMessage
878 }
879
880 func (m *FlowClassifyDetails) Size() (size int) {
881         if m == nil {
882                 return 0
883         }
884         size += 4 // m.SwIfIndex
885         size += 4 // m.TableIndex
886         return size
887 }
888 func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
889         if b == nil {
890                 b = make([]byte, m.Size())
891         }
892         buf := codec.NewBuffer(b)
893         buf.EncodeUint32(uint32(m.SwIfIndex))
894         buf.EncodeUint32(m.TableIndex)
895         return buf.Bytes(), nil
896 }
897 func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
898         buf := codec.NewBuffer(b)
899         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
900         m.TableIndex = buf.DecodeUint32()
901         return nil
902 }
903
904 // FlowClassifyDump defines message 'flow_classify_dump'.
905 type FlowClassifyDump struct {
906         Type      FlowClassifyTable              `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
907         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
908 }
909
910 func (m *FlowClassifyDump) Reset()               { *m = FlowClassifyDump{} }
911 func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
912 func (*FlowClassifyDump) GetCrcString() string   { return "8a6ad43d" }
913 func (*FlowClassifyDump) GetMessageType() api.MessageType {
914         return api.RequestMessage
915 }
916
917 func (m *FlowClassifyDump) Size() (size int) {
918         if m == nil {
919                 return 0
920         }
921         size += 1 // m.Type
922         size += 4 // m.SwIfIndex
923         return size
924 }
925 func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
926         if b == nil {
927                 b = make([]byte, m.Size())
928         }
929         buf := codec.NewBuffer(b)
930         buf.EncodeUint8(uint8(m.Type))
931         buf.EncodeUint32(uint32(m.SwIfIndex))
932         return buf.Bytes(), nil
933 }
934 func (m *FlowClassifyDump) Unmarshal(b []byte) error {
935         buf := codec.NewBuffer(b)
936         m.Type = FlowClassifyTable(buf.DecodeUint8())
937         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
938         return nil
939 }
940
941 // FlowClassifySetInterface defines message 'flow_classify_set_interface'.
942 type FlowClassifySetInterface struct {
943         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
944         IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
945         IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
946         IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
947 }
948
949 func (m *FlowClassifySetInterface) Reset()               { *m = FlowClassifySetInterface{} }
950 func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
951 func (*FlowClassifySetInterface) GetCrcString() string   { return "b6192f1c" }
952 func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
953         return api.RequestMessage
954 }
955
956 func (m *FlowClassifySetInterface) Size() (size int) {
957         if m == nil {
958                 return 0
959         }
960         size += 4 // m.SwIfIndex
961         size += 4 // m.IP4TableIndex
962         size += 4 // m.IP6TableIndex
963         size += 1 // m.IsAdd
964         return size
965 }
966 func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
967         if b == nil {
968                 b = make([]byte, m.Size())
969         }
970         buf := codec.NewBuffer(b)
971         buf.EncodeUint32(uint32(m.SwIfIndex))
972         buf.EncodeUint32(m.IP4TableIndex)
973         buf.EncodeUint32(m.IP6TableIndex)
974         buf.EncodeBool(m.IsAdd)
975         return buf.Bytes(), nil
976 }
977 func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
978         buf := codec.NewBuffer(b)
979         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
980         m.IP4TableIndex = buf.DecodeUint32()
981         m.IP6TableIndex = buf.DecodeUint32()
982         m.IsAdd = buf.DecodeBool()
983         return nil
984 }
985
986 // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
987 type FlowClassifySetInterfaceReply struct {
988         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
989 }
990
991 func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
992 func (*FlowClassifySetInterfaceReply) GetMessageName() string {
993         return "flow_classify_set_interface_reply"
994 }
995 func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
996 func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
997         return api.ReplyMessage
998 }
999
1000 func (m *FlowClassifySetInterfaceReply) Size() (size int) {
1001         if m == nil {
1002                 return 0
1003         }
1004         size += 4 // m.Retval
1005         return size
1006 }
1007 func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1008         if b == nil {
1009                 b = make([]byte, m.Size())
1010         }
1011         buf := codec.NewBuffer(b)
1012         buf.EncodeInt32(m.Retval)
1013         return buf.Bytes(), nil
1014 }
1015 func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
1016         buf := codec.NewBuffer(b)
1017         m.Retval = buf.DecodeInt32()
1018         return nil
1019 }
1020
1021 // InputACLSetInterface defines message 'input_acl_set_interface'.
1022 type InputACLSetInterface struct {
1023         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1024         IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1025         IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1026         L2TableIndex  uint32                         `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1027         IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1028 }
1029
1030 func (m *InputACLSetInterface) Reset()               { *m = InputACLSetInterface{} }
1031 func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
1032 func (*InputACLSetInterface) GetCrcString() string   { return "de7ad708" }
1033 func (*InputACLSetInterface) GetMessageType() api.MessageType {
1034         return api.RequestMessage
1035 }
1036
1037 func (m *InputACLSetInterface) Size() (size int) {
1038         if m == nil {
1039                 return 0
1040         }
1041         size += 4 // m.SwIfIndex
1042         size += 4 // m.IP4TableIndex
1043         size += 4 // m.IP6TableIndex
1044         size += 4 // m.L2TableIndex
1045         size += 1 // m.IsAdd
1046         return size
1047 }
1048 func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1049         if b == nil {
1050                 b = make([]byte, m.Size())
1051         }
1052         buf := codec.NewBuffer(b)
1053         buf.EncodeUint32(uint32(m.SwIfIndex))
1054         buf.EncodeUint32(m.IP4TableIndex)
1055         buf.EncodeUint32(m.IP6TableIndex)
1056         buf.EncodeUint32(m.L2TableIndex)
1057         buf.EncodeBool(m.IsAdd)
1058         return buf.Bytes(), nil
1059 }
1060 func (m *InputACLSetInterface) Unmarshal(b []byte) error {
1061         buf := codec.NewBuffer(b)
1062         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1063         m.IP4TableIndex = buf.DecodeUint32()
1064         m.IP6TableIndex = buf.DecodeUint32()
1065         m.L2TableIndex = buf.DecodeUint32()
1066         m.IsAdd = buf.DecodeBool()
1067         return nil
1068 }
1069
1070 // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
1071 type InputACLSetInterfaceReply struct {
1072         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1073 }
1074
1075 func (m *InputACLSetInterfaceReply) Reset()               { *m = InputACLSetInterfaceReply{} }
1076 func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
1077 func (*InputACLSetInterfaceReply) GetCrcString() string   { return "e8d4e804" }
1078 func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
1079         return api.ReplyMessage
1080 }
1081
1082 func (m *InputACLSetInterfaceReply) Size() (size int) {
1083         if m == nil {
1084                 return 0
1085         }
1086         size += 4 // m.Retval
1087         return size
1088 }
1089 func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1090         if b == nil {
1091                 b = make([]byte, m.Size())
1092         }
1093         buf := codec.NewBuffer(b)
1094         buf.EncodeInt32(m.Retval)
1095         return buf.Bytes(), nil
1096 }
1097 func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
1098         buf := codec.NewBuffer(b)
1099         m.Retval = buf.DecodeInt32()
1100         return nil
1101 }
1102
1103 // OutputACLSetInterface defines message 'output_acl_set_interface'.
1104 type OutputACLSetInterface struct {
1105         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1106         IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1107         IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1108         L2TableIndex  uint32                         `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1109         IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1110 }
1111
1112 func (m *OutputACLSetInterface) Reset()               { *m = OutputACLSetInterface{} }
1113 func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
1114 func (*OutputACLSetInterface) GetCrcString() string   { return "de7ad708" }
1115 func (*OutputACLSetInterface) GetMessageType() api.MessageType {
1116         return api.RequestMessage
1117 }
1118
1119 func (m *OutputACLSetInterface) Size() (size int) {
1120         if m == nil {
1121                 return 0
1122         }
1123         size += 4 // m.SwIfIndex
1124         size += 4 // m.IP4TableIndex
1125         size += 4 // m.IP6TableIndex
1126         size += 4 // m.L2TableIndex
1127         size += 1 // m.IsAdd
1128         return size
1129 }
1130 func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1131         if b == nil {
1132                 b = make([]byte, m.Size())
1133         }
1134         buf := codec.NewBuffer(b)
1135         buf.EncodeUint32(uint32(m.SwIfIndex))
1136         buf.EncodeUint32(m.IP4TableIndex)
1137         buf.EncodeUint32(m.IP6TableIndex)
1138         buf.EncodeUint32(m.L2TableIndex)
1139         buf.EncodeBool(m.IsAdd)
1140         return buf.Bytes(), nil
1141 }
1142 func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
1143         buf := codec.NewBuffer(b)
1144         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1145         m.IP4TableIndex = buf.DecodeUint32()
1146         m.IP6TableIndex = buf.DecodeUint32()
1147         m.L2TableIndex = buf.DecodeUint32()
1148         m.IsAdd = buf.DecodeBool()
1149         return nil
1150 }
1151
1152 // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
1153 type OutputACLSetInterfaceReply struct {
1154         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1155 }
1156
1157 func (m *OutputACLSetInterfaceReply) Reset()               { *m = OutputACLSetInterfaceReply{} }
1158 func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
1159 func (*OutputACLSetInterfaceReply) GetCrcString() string   { return "e8d4e804" }
1160 func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
1161         return api.ReplyMessage
1162 }
1163
1164 func (m *OutputACLSetInterfaceReply) Size() (size int) {
1165         if m == nil {
1166                 return 0
1167         }
1168         size += 4 // m.Retval
1169         return size
1170 }
1171 func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1172         if b == nil {
1173                 b = make([]byte, m.Size())
1174         }
1175         buf := codec.NewBuffer(b)
1176         buf.EncodeInt32(m.Retval)
1177         return buf.Bytes(), nil
1178 }
1179 func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
1180         buf := codec.NewBuffer(b)
1181         m.Retval = buf.DecodeInt32()
1182         return nil
1183 }
1184
1185 // PolicerClassifyDetails defines message 'policer_classify_details'.
1186 type PolicerClassifyDetails struct {
1187         SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1188         TableIndex uint32                         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1189 }
1190
1191 func (m *PolicerClassifyDetails) Reset()               { *m = PolicerClassifyDetails{} }
1192 func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
1193 func (*PolicerClassifyDetails) GetCrcString() string   { return "dfd08765" }
1194 func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
1195         return api.ReplyMessage
1196 }
1197
1198 func (m *PolicerClassifyDetails) Size() (size int) {
1199         if m == nil {
1200                 return 0
1201         }
1202         size += 4 // m.SwIfIndex
1203         size += 4 // m.TableIndex
1204         return size
1205 }
1206 func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
1207         if b == nil {
1208                 b = make([]byte, m.Size())
1209         }
1210         buf := codec.NewBuffer(b)
1211         buf.EncodeUint32(uint32(m.SwIfIndex))
1212         buf.EncodeUint32(m.TableIndex)
1213         return buf.Bytes(), nil
1214 }
1215 func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
1216         buf := codec.NewBuffer(b)
1217         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1218         m.TableIndex = buf.DecodeUint32()
1219         return nil
1220 }
1221
1222 // PolicerClassifyDump defines message 'policer_classify_dump'.
1223 type PolicerClassifyDump struct {
1224         Type      PolicerClassifyTable           `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
1225         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1226 }
1227
1228 func (m *PolicerClassifyDump) Reset()               { *m = PolicerClassifyDump{} }
1229 func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
1230 func (*PolicerClassifyDump) GetCrcString() string   { return "6bfe6603" }
1231 func (*PolicerClassifyDump) GetMessageType() api.MessageType {
1232         return api.RequestMessage
1233 }
1234
1235 func (m *PolicerClassifyDump) Size() (size int) {
1236         if m == nil {
1237                 return 0
1238         }
1239         size += 1 // m.Type
1240         size += 4 // m.SwIfIndex
1241         return size
1242 }
1243 func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
1244         if b == nil {
1245                 b = make([]byte, m.Size())
1246         }
1247         buf := codec.NewBuffer(b)
1248         buf.EncodeUint8(uint8(m.Type))
1249         buf.EncodeUint32(uint32(m.SwIfIndex))
1250         return buf.Bytes(), nil
1251 }
1252 func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
1253         buf := codec.NewBuffer(b)
1254         m.Type = PolicerClassifyTable(buf.DecodeUint8())
1255         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1256         return nil
1257 }
1258
1259 // PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
1260 type PolicerClassifySetInterface struct {
1261         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1262         IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1263         IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1264         L2TableIndex  uint32                         `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1265         IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1266 }
1267
1268 func (m *PolicerClassifySetInterface) Reset()               { *m = PolicerClassifySetInterface{} }
1269 func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
1270 func (*PolicerClassifySetInterface) GetCrcString() string   { return "de7ad708" }
1271 func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
1272         return api.RequestMessage
1273 }
1274
1275 func (m *PolicerClassifySetInterface) Size() (size int) {
1276         if m == nil {
1277                 return 0
1278         }
1279         size += 4 // m.SwIfIndex
1280         size += 4 // m.IP4TableIndex
1281         size += 4 // m.IP6TableIndex
1282         size += 4 // m.L2TableIndex
1283         size += 1 // m.IsAdd
1284         return size
1285 }
1286 func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1287         if b == nil {
1288                 b = make([]byte, m.Size())
1289         }
1290         buf := codec.NewBuffer(b)
1291         buf.EncodeUint32(uint32(m.SwIfIndex))
1292         buf.EncodeUint32(m.IP4TableIndex)
1293         buf.EncodeUint32(m.IP6TableIndex)
1294         buf.EncodeUint32(m.L2TableIndex)
1295         buf.EncodeBool(m.IsAdd)
1296         return buf.Bytes(), nil
1297 }
1298 func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
1299         buf := codec.NewBuffer(b)
1300         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1301         m.IP4TableIndex = buf.DecodeUint32()
1302         m.IP6TableIndex = buf.DecodeUint32()
1303         m.L2TableIndex = buf.DecodeUint32()
1304         m.IsAdd = buf.DecodeBool()
1305         return nil
1306 }
1307
1308 // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
1309 type PolicerClassifySetInterfaceReply struct {
1310         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1311 }
1312
1313 func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
1314 func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
1315         return "policer_classify_set_interface_reply"
1316 }
1317 func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1318 func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
1319         return api.ReplyMessage
1320 }
1321
1322 func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
1323         if m == nil {
1324                 return 0
1325         }
1326         size += 4 // m.Retval
1327         return size
1328 }
1329 func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1330         if b == nil {
1331                 b = make([]byte, m.Size())
1332         }
1333         buf := codec.NewBuffer(b)
1334         buf.EncodeInt32(m.Retval)
1335         return buf.Bytes(), nil
1336 }
1337 func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
1338         buf := codec.NewBuffer(b)
1339         m.Retval = buf.DecodeInt32()
1340         return nil
1341 }
1342
1343 func init() { file_classify_binapi_init() }
1344 func file_classify_binapi_init() {
1345         api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
1346         api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
1347         api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
1348         api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
1349         api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
1350         api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
1351         api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
1352         api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
1353         api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
1354         api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
1355         api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
1356         api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
1357         api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
1358         api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
1359         api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
1360         api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
1361         api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
1362         api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
1363         api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
1364         api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
1365         api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
1366         api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
1367         api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
1368         api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
1369         api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
1370         api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
1371         api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
1372         api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
1373 }
1374
1375 // Messages returns list of all messages in this module.
1376 func AllMessages() []api.Message {
1377         return []api.Message{
1378                 (*ClassifyAddDelSession)(nil),
1379                 (*ClassifyAddDelSessionReply)(nil),
1380                 (*ClassifyAddDelTable)(nil),
1381                 (*ClassifyAddDelTableReply)(nil),
1382                 (*ClassifySessionDetails)(nil),
1383                 (*ClassifySessionDump)(nil),
1384                 (*ClassifySetInterfaceIPTable)(nil),
1385                 (*ClassifySetInterfaceIPTableReply)(nil),
1386                 (*ClassifySetInterfaceL2Tables)(nil),
1387                 (*ClassifySetInterfaceL2TablesReply)(nil),
1388                 (*ClassifyTableByInterface)(nil),
1389                 (*ClassifyTableByInterfaceReply)(nil),
1390                 (*ClassifyTableIds)(nil),
1391                 (*ClassifyTableIdsReply)(nil),
1392                 (*ClassifyTableInfo)(nil),
1393                 (*ClassifyTableInfoReply)(nil),
1394                 (*FlowClassifyDetails)(nil),
1395                 (*FlowClassifyDump)(nil),
1396                 (*FlowClassifySetInterface)(nil),
1397                 (*FlowClassifySetInterfaceReply)(nil),
1398                 (*InputACLSetInterface)(nil),
1399                 (*InputACLSetInterfaceReply)(nil),
1400                 (*OutputACLSetInterface)(nil),
1401                 (*OutputACLSetInterfaceReply)(nil),
1402                 (*PolicerClassifyDetails)(nil),
1403                 (*PolicerClassifyDump)(nil),
1404                 (*PolicerClassifySetInterface)(nil),
1405                 (*PolicerClassifySetInterfaceReply)(nil),
1406         }
1407 }