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