Improve binapi generator
[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 // source: /usr/share/vpp/api/core/classify.api.json
6
7 // Package classify contains generated bindings for API file classify.api.
8 //
9 // Contents:
10 //   3 enums
11 //  28 messages
12 //
13 package classify
14
15 import (
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"
19         "strconv"
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=%!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"`
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() int {
145         if m == nil {
146                 return 0
147         }
148         var size int
149         size += 1                // m.IsAdd
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
158         return size
159 }
160 func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
161         var buf *codec.Buffer
162         if b == nil {
163                 buf = codec.NewBuffer(make([]byte, m.Size()))
164         } else {
165                 buf = codec.NewBuffer(b)
166         }
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
177 }
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))
189         return nil
190 }
191
192 // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
193 type ClassifyAddDelSessionReply struct {
194         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
195 }
196
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
202 }
203
204 func (m *ClassifyAddDelSessionReply) Size() int {
205         if m == nil {
206                 return 0
207         }
208         var size int
209         size += 4 // m.Retval
210         return size
211 }
212 func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
213         var buf *codec.Buffer
214         if b == nil {
215                 buf = codec.NewBuffer(make([]byte, m.Size()))
216         } else {
217                 buf = codec.NewBuffer(b)
218         }
219         buf.EncodeUint32(uint32(m.Retval))
220         return buf.Bytes(), nil
221 }
222 func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
223         buf := codec.NewBuffer(b)
224         m.Retval = int32(buf.DecodeUint32())
225         return nil
226 }
227
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"`
243 }
244
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
250 }
251
252 func (m *ClassifyAddDelTable) Size() int {
253         if m == nil {
254                 return 0
255         }
256         var size int
257         size += 1               // m.IsAdd
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
270         return size
271 }
272 func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
273         var buf *codec.Buffer
274         if b == nil {
275                 buf = codec.NewBuffer(make([]byte, m.Size()))
276         } else {
277                 buf = codec.NewBuffer(b)
278         }
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
293 }
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))
309         return nil
310 }
311
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"`
318 }
319
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
325 }
326
327 func (m *ClassifyAddDelTableReply) Size() int {
328         if m == nil {
329                 return 0
330         }
331         var size int
332         size += 4 // m.Retval
333         size += 4 // m.NewTableIndex
334         size += 4 // m.SkipNVectors
335         size += 4 // m.MatchNVectors
336         return size
337 }
338 func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
339         var buf *codec.Buffer
340         if b == nil {
341                 buf = codec.NewBuffer(make([]byte, m.Size()))
342         } else {
343                 buf = codec.NewBuffer(b)
344         }
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
350 }
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()
357         return nil
358 }
359
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"`
369 }
370
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
376 }
377
378 func (m *ClassifySessionDetails) Size() int {
379         if m == nil {
380                 return 0
381         }
382         var 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
390         return size
391 }
392 func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
393         var buf *codec.Buffer
394         if b == nil {
395                 buf = codec.NewBuffer(make([]byte, m.Size()))
396         } else {
397                 buf = codec.NewBuffer(b)
398         }
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
407 }
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))
417         return nil
418 }
419
420 // ClassifySessionDump defines message 'classify_session_dump'.
421 type ClassifySessionDump struct {
422         TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
423 }
424
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
430 }
431
432 func (m *ClassifySessionDump) Size() int {
433         if m == nil {
434                 return 0
435         }
436         var size int
437         size += 4 // m.TableID
438         return size
439 }
440 func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
441         var buf *codec.Buffer
442         if b == nil {
443                 buf = codec.NewBuffer(make([]byte, m.Size()))
444         } else {
445                 buf = codec.NewBuffer(b)
446         }
447         buf.EncodeUint32(uint32(m.TableID))
448         return buf.Bytes(), nil
449 }
450 func (m *ClassifySessionDump) Unmarshal(b []byte) error {
451         buf := codec.NewBuffer(b)
452         m.TableID = buf.DecodeUint32()
453         return nil
454 }
455
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"`
461 }
462
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
468 }
469
470 func (m *ClassifySetInterfaceIPTable) Size() int {
471         if m == nil {
472                 return 0
473         }
474         var size int
475         size += 1 // m.IsIPv6
476         size += 4 // m.SwIfIndex
477         size += 4 // m.TableIndex
478         return size
479 }
480 func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
481         var buf *codec.Buffer
482         if b == nil {
483                 buf = codec.NewBuffer(make([]byte, m.Size()))
484         } else {
485                 buf = codec.NewBuffer(b)
486         }
487         buf.EncodeBool(m.IsIPv6)
488         buf.EncodeUint32(uint32(m.SwIfIndex))
489         buf.EncodeUint32(uint32(m.TableIndex))
490         return buf.Bytes(), nil
491 }
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()
497         return nil
498 }
499
500 // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
501 type ClassifySetInterfaceIPTableReply struct {
502         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
503 }
504
505 func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
506 func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
507         return "classify_set_interface_ip_table_reply"
508 }
509 func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
510 func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
511         return api.ReplyMessage
512 }
513
514 func (m *ClassifySetInterfaceIPTableReply) Size() int {
515         if m == nil {
516                 return 0
517         }
518         var size int
519         size += 4 // m.Retval
520         return size
521 }
522 func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
523         var buf *codec.Buffer
524         if b == nil {
525                 buf = codec.NewBuffer(make([]byte, m.Size()))
526         } else {
527                 buf = codec.NewBuffer(b)
528         }
529         buf.EncodeUint32(uint32(m.Retval))
530         return buf.Bytes(), nil
531 }
532 func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
533         buf := codec.NewBuffer(b)
534         m.Retval = int32(buf.DecodeUint32())
535         return nil
536 }
537
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"`
545 }
546
547 func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
548 func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
549         return "classify_set_interface_l2_tables"
550 }
551 func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
552 func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
553         return api.RequestMessage
554 }
555
556 func (m *ClassifySetInterfaceL2Tables) Size() int {
557         if m == nil {
558                 return 0
559         }
560         var 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
566         return size
567 }
568 func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
569         var buf *codec.Buffer
570         if b == nil {
571                 buf = codec.NewBuffer(make([]byte, m.Size()))
572         } else {
573                 buf = codec.NewBuffer(b)
574         }
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
581 }
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()
589         return nil
590 }
591
592 // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
593 type ClassifySetInterfaceL2TablesReply struct {
594         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
595 }
596
597 func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
598 func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
599         return "classify_set_interface_l2_tables_reply"
600 }
601 func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
602 func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
603         return api.ReplyMessage
604 }
605
606 func (m *ClassifySetInterfaceL2TablesReply) Size() int {
607         if m == nil {
608                 return 0
609         }
610         var size int
611         size += 4 // m.Retval
612         return size
613 }
614 func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
615         var buf *codec.Buffer
616         if b == nil {
617                 buf = codec.NewBuffer(make([]byte, m.Size()))
618         } else {
619                 buf = codec.NewBuffer(b)
620         }
621         buf.EncodeUint32(uint32(m.Retval))
622         return buf.Bytes(), nil
623 }
624 func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
625         buf := codec.NewBuffer(b)
626         m.Retval = int32(buf.DecodeUint32())
627         return nil
628 }
629
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"`
633 }
634
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
640 }
641
642 func (m *ClassifyTableByInterface) Size() int {
643         if m == nil {
644                 return 0
645         }
646         var size int
647         size += 4 // m.SwIfIndex
648         return size
649 }
650 func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
651         var buf *codec.Buffer
652         if b == nil {
653                 buf = codec.NewBuffer(make([]byte, m.Size()))
654         } else {
655                 buf = codec.NewBuffer(b)
656         }
657         buf.EncodeUint32(uint32(m.SwIfIndex))
658         return buf.Bytes(), nil
659 }
660 func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
661         buf := codec.NewBuffer(b)
662         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
663         return nil
664 }
665
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"`
673 }
674
675 func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
676 func (*ClassifyTableByInterfaceReply) GetMessageName() string {
677         return "classify_table_by_interface_reply"
678 }
679 func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
680 func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
681         return api.ReplyMessage
682 }
683
684 func (m *ClassifyTableByInterfaceReply) Size() int {
685         if m == nil {
686                 return 0
687         }
688         var 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
694         return size
695 }
696 func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
697         var buf *codec.Buffer
698         if b == nil {
699                 buf = codec.NewBuffer(make([]byte, m.Size()))
700         } else {
701                 buf = codec.NewBuffer(b)
702         }
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
709 }
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()
717         return nil
718 }
719
720 // ClassifyTableIds defines message 'classify_table_ids'.
721 type ClassifyTableIds struct{}
722
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
728 }
729
730 func (m *ClassifyTableIds) Size() int {
731         if m == nil {
732                 return 0
733         }
734         var size int
735         return size
736 }
737 func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
738         var buf *codec.Buffer
739         if b == nil {
740                 buf = codec.NewBuffer(make([]byte, m.Size()))
741         } else {
742                 buf = codec.NewBuffer(b)
743         }
744         return buf.Bytes(), nil
745 }
746 func (m *ClassifyTableIds) Unmarshal(b []byte) error {
747         return nil
748 }
749
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"`
755 }
756
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
762 }
763
764 func (m *ClassifyTableIdsReply) Size() int {
765         if m == nil {
766                 return 0
767         }
768         var size int
769         size += 4              // m.Retval
770         size += 4              // m.Count
771         size += 4 * len(m.Ids) // m.Ids
772         return size
773 }
774 func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
775         var buf *codec.Buffer
776         if b == nil {
777                 buf = codec.NewBuffer(make([]byte, m.Size()))
778         } else {
779                 buf = codec.NewBuffer(b)
780         }
781         buf.EncodeUint32(uint32(m.Retval))
782         buf.EncodeUint32(uint32(len(m.Ids)))
783         for i := 0; i < len(m.Ids); i++ {
784                 var x uint32
785                 if i < len(m.Ids) {
786                         x = uint32(m.Ids[i])
787                 }
788                 buf.EncodeUint32(uint32(x))
789         }
790         return buf.Bytes(), nil
791 }
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()
799         }
800         return nil
801 }
802
803 // ClassifyTableInfo defines message 'classify_table_info'.
804 type ClassifyTableInfo struct {
805         TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
806 }
807
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
813 }
814
815 func (m *ClassifyTableInfo) Size() int {
816         if m == nil {
817                 return 0
818         }
819         var size int
820         size += 4 // m.TableID
821         return size
822 }
823 func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
824         var buf *codec.Buffer
825         if b == nil {
826                 buf = codec.NewBuffer(make([]byte, m.Size()))
827         } else {
828                 buf = codec.NewBuffer(b)
829         }
830         buf.EncodeUint32(uint32(m.TableID))
831         return buf.Bytes(), nil
832 }
833 func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
834         buf := codec.NewBuffer(b)
835         m.TableID = buf.DecodeUint32()
836         return nil
837 }
838
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"`
851 }
852
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
858 }
859
860 func (m *ClassifyTableInfoReply) Size() int {
861         if m == nil {
862                 return 0
863         }
864         var 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
875         return size
876 }
877 func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
878         var buf *codec.Buffer
879         if b == nil {
880                 buf = codec.NewBuffer(make([]byte, m.Size()))
881         } else {
882                 buf = codec.NewBuffer(b)
883         }
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
895 }
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))
908         return nil
909 }
910
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"`
915 }
916
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
922 }
923
924 func (m *FlowClassifyDetails) Size() int {
925         if m == nil {
926                 return 0
927         }
928         var size int
929         size += 4 // m.SwIfIndex
930         size += 4 // m.TableIndex
931         return size
932 }
933 func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
934         var buf *codec.Buffer
935         if b == nil {
936                 buf = codec.NewBuffer(make([]byte, m.Size()))
937         } else {
938                 buf = codec.NewBuffer(b)
939         }
940         buf.EncodeUint32(uint32(m.SwIfIndex))
941         buf.EncodeUint32(uint32(m.TableIndex))
942         return buf.Bytes(), nil
943 }
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()
948         return nil
949 }
950
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"`
955 }
956
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
962 }
963
964 func (m *FlowClassifyDump) Size() int {
965         if m == nil {
966                 return 0
967         }
968         var size int
969         size += 1 // m.Type
970         size += 4 // m.SwIfIndex
971         return size
972 }
973 func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
974         var buf *codec.Buffer
975         if b == nil {
976                 buf = codec.NewBuffer(make([]byte, m.Size()))
977         } else {
978                 buf = codec.NewBuffer(b)
979         }
980         buf.EncodeUint8(uint8(m.Type))
981         buf.EncodeUint32(uint32(m.SwIfIndex))
982         return buf.Bytes(), nil
983 }
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())
988         return nil
989 }
990
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"`
997 }
998
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
1004 }
1005
1006 func (m *FlowClassifySetInterface) Size() int {
1007         if m == nil {
1008                 return 0
1009         }
1010         var size int
1011         size += 4 // m.SwIfIndex
1012         size += 4 // m.IP4TableIndex
1013         size += 4 // m.IP6TableIndex
1014         size += 1 // m.IsAdd
1015         return size
1016 }
1017 func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1018         var buf *codec.Buffer
1019         if b == nil {
1020                 buf = codec.NewBuffer(make([]byte, m.Size()))
1021         } else {
1022                 buf = codec.NewBuffer(b)
1023         }
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
1029 }
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()
1036         return nil
1037 }
1038
1039 // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
1040 type FlowClassifySetInterfaceReply struct {
1041         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1042 }
1043
1044 func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
1045 func (*FlowClassifySetInterfaceReply) GetMessageName() string {
1046         return "flow_classify_set_interface_reply"
1047 }
1048 func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1049 func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
1050         return api.ReplyMessage
1051 }
1052
1053 func (m *FlowClassifySetInterfaceReply) Size() int {
1054         if m == nil {
1055                 return 0
1056         }
1057         var size int
1058         size += 4 // m.Retval
1059         return size
1060 }
1061 func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1062         var buf *codec.Buffer
1063         if b == nil {
1064                 buf = codec.NewBuffer(make([]byte, m.Size()))
1065         } else {
1066                 buf = codec.NewBuffer(b)
1067         }
1068         buf.EncodeUint32(uint32(m.Retval))
1069         return buf.Bytes(), nil
1070 }
1071 func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
1072         buf := codec.NewBuffer(b)
1073         m.Retval = int32(buf.DecodeUint32())
1074         return nil
1075 }
1076
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"`
1084 }
1085
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
1091 }
1092
1093 func (m *InputACLSetInterface) Size() int {
1094         if m == nil {
1095                 return 0
1096         }
1097         var 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
1103         return size
1104 }
1105 func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1106         var buf *codec.Buffer
1107         if b == nil {
1108                 buf = codec.NewBuffer(make([]byte, m.Size()))
1109         } else {
1110                 buf = codec.NewBuffer(b)
1111         }
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
1118 }
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()
1126         return nil
1127 }
1128
1129 // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
1130 type InputACLSetInterfaceReply struct {
1131         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1132 }
1133
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
1139 }
1140
1141 func (m *InputACLSetInterfaceReply) Size() int {
1142         if m == nil {
1143                 return 0
1144         }
1145         var size int
1146         size += 4 // m.Retval
1147         return size
1148 }
1149 func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1150         var buf *codec.Buffer
1151         if b == nil {
1152                 buf = codec.NewBuffer(make([]byte, m.Size()))
1153         } else {
1154                 buf = codec.NewBuffer(b)
1155         }
1156         buf.EncodeUint32(uint32(m.Retval))
1157         return buf.Bytes(), nil
1158 }
1159 func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
1160         buf := codec.NewBuffer(b)
1161         m.Retval = int32(buf.DecodeUint32())
1162         return nil
1163 }
1164
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"`
1172 }
1173
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
1179 }
1180
1181 func (m *OutputACLSetInterface) Size() int {
1182         if m == nil {
1183                 return 0
1184         }
1185         var 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
1191         return size
1192 }
1193 func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1194         var buf *codec.Buffer
1195         if b == nil {
1196                 buf = codec.NewBuffer(make([]byte, m.Size()))
1197         } else {
1198                 buf = codec.NewBuffer(b)
1199         }
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
1206 }
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()
1214         return nil
1215 }
1216
1217 // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
1218 type OutputACLSetInterfaceReply struct {
1219         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1220 }
1221
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
1227 }
1228
1229 func (m *OutputACLSetInterfaceReply) Size() int {
1230         if m == nil {
1231                 return 0
1232         }
1233         var size int
1234         size += 4 // m.Retval
1235         return size
1236 }
1237 func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1238         var buf *codec.Buffer
1239         if b == nil {
1240                 buf = codec.NewBuffer(make([]byte, m.Size()))
1241         } else {
1242                 buf = codec.NewBuffer(b)
1243         }
1244         buf.EncodeUint32(uint32(m.Retval))
1245         return buf.Bytes(), nil
1246 }
1247 func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
1248         buf := codec.NewBuffer(b)
1249         m.Retval = int32(buf.DecodeUint32())
1250         return nil
1251 }
1252
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"`
1257 }
1258
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
1264 }
1265
1266 func (m *PolicerClassifyDetails) Size() int {
1267         if m == nil {
1268                 return 0
1269         }
1270         var size int
1271         size += 4 // m.SwIfIndex
1272         size += 4 // m.TableIndex
1273         return size
1274 }
1275 func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
1276         var buf *codec.Buffer
1277         if b == nil {
1278                 buf = codec.NewBuffer(make([]byte, m.Size()))
1279         } else {
1280                 buf = codec.NewBuffer(b)
1281         }
1282         buf.EncodeUint32(uint32(m.SwIfIndex))
1283         buf.EncodeUint32(uint32(m.TableIndex))
1284         return buf.Bytes(), nil
1285 }
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()
1290         return nil
1291 }
1292
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"`
1297 }
1298
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
1304 }
1305
1306 func (m *PolicerClassifyDump) Size() int {
1307         if m == nil {
1308                 return 0
1309         }
1310         var size int
1311         size += 1 // m.Type
1312         size += 4 // m.SwIfIndex
1313         return size
1314 }
1315 func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
1316         var buf *codec.Buffer
1317         if b == nil {
1318                 buf = codec.NewBuffer(make([]byte, m.Size()))
1319         } else {
1320                 buf = codec.NewBuffer(b)
1321         }
1322         buf.EncodeUint8(uint8(m.Type))
1323         buf.EncodeUint32(uint32(m.SwIfIndex))
1324         return buf.Bytes(), nil
1325 }
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())
1330         return nil
1331 }
1332
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"`
1340 }
1341
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
1347 }
1348
1349 func (m *PolicerClassifySetInterface) Size() int {
1350         if m == nil {
1351                 return 0
1352         }
1353         var 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
1359         return size
1360 }
1361 func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1362         var buf *codec.Buffer
1363         if b == nil {
1364                 buf = codec.NewBuffer(make([]byte, m.Size()))
1365         } else {
1366                 buf = codec.NewBuffer(b)
1367         }
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
1374 }
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()
1382         return nil
1383 }
1384
1385 // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
1386 type PolicerClassifySetInterfaceReply struct {
1387         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1388 }
1389
1390 func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
1391 func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
1392         return "policer_classify_set_interface_reply"
1393 }
1394 func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1395 func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
1396         return api.ReplyMessage
1397 }
1398
1399 func (m *PolicerClassifySetInterfaceReply) Size() int {
1400         if m == nil {
1401                 return 0
1402         }
1403         var size int
1404         size += 4 // m.Retval
1405         return size
1406 }
1407 func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1408         var buf *codec.Buffer
1409         if b == nil {
1410                 buf = codec.NewBuffer(make([]byte, m.Size()))
1411         } else {
1412                 buf = codec.NewBuffer(b)
1413         }
1414         buf.EncodeUint32(uint32(m.Retval))
1415         return buf.Bytes(), nil
1416 }
1417 func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
1418         buf := codec.NewBuffer(b)
1419         m.Retval = int32(buf.DecodeUint32())
1420         return nil
1421 }
1422
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")
1453 }
1454
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),
1486         }
1487 }