Improve binapi generator
[govpp.git] / binapi / acl / acl.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/plugins/acl.api.json
6
7 // Package acl contains generated bindings for API file acl.api.
8 //
9 // Contents:
10 //  38 messages
11 //
12 package acl
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         acl_types "git.fd.io/govpp.git/binapi/acl_types"
17         _ "git.fd.io/govpp.git/binapi/ethernet_types"
18         interface_types "git.fd.io/govpp.git/binapi/interface_types"
19         ip_types "git.fd.io/govpp.git/binapi/ip_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    = "acl"
31         APIVersion = "2.0.0"
32         VersionCrc = 0x68c4cb37
33 )
34
35 // ACLAddReplace defines message 'acl_add_replace'.
36 type ACLAddReplace struct {
37         ACLIndex uint32              `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
38         Tag      string              `binapi:"string[64],name=tag" json:"tag,omitempty"`
39         Count    uint32              `binapi:"u32,name=count" json:"-"`
40         R        []acl_types.ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
41 }
42
43 func (m *ACLAddReplace) Reset()               { *m = ACLAddReplace{} }
44 func (*ACLAddReplace) GetMessageName() string { return "acl_add_replace" }
45 func (*ACLAddReplace) GetCrcString() string   { return "1cabdeab" }
46 func (*ACLAddReplace) GetMessageType() api.MessageType {
47         return api.RequestMessage
48 }
49
50 func (m *ACLAddReplace) Size() int {
51         if m == nil {
52                 return 0
53         }
54         var size int
55         size += 4  // m.ACLIndex
56         size += 64 // m.Tag
57         size += 4  // m.Count
58         for j1 := 0; j1 < len(m.R); j1++ {
59                 var s1 acl_types.ACLRule
60                 _ = s1
61                 if j1 < len(m.R) {
62                         s1 = m.R[j1]
63                 }
64                 size += 1      // s1.IsPermit
65                 size += 1      // s1.SrcPrefix.Address.Af
66                 size += 1 * 16 // s1.SrcPrefix.Address.Un
67                 size += 1      // s1.SrcPrefix.Len
68                 size += 1      // s1.DstPrefix.Address.Af
69                 size += 1 * 16 // s1.DstPrefix.Address.Un
70                 size += 1      // s1.DstPrefix.Len
71                 size += 1      // s1.Proto
72                 size += 2      // s1.SrcportOrIcmptypeFirst
73                 size += 2      // s1.SrcportOrIcmptypeLast
74                 size += 2      // s1.DstportOrIcmpcodeFirst
75                 size += 2      // s1.DstportOrIcmpcodeLast
76                 size += 1      // s1.TCPFlagsMask
77                 size += 1      // s1.TCPFlagsValue
78         }
79         return size
80 }
81 func (m *ACLAddReplace) Marshal(b []byte) ([]byte, error) {
82         var buf *codec.Buffer
83         if b == nil {
84                 buf = codec.NewBuffer(make([]byte, m.Size()))
85         } else {
86                 buf = codec.NewBuffer(b)
87         }
88         buf.EncodeUint32(uint32(m.ACLIndex))
89         buf.EncodeString(m.Tag, 64)
90         buf.EncodeUint32(uint32(len(m.R)))
91         for j0 := 0; j0 < len(m.R); j0++ {
92                 var v0 acl_types.ACLRule
93                 if j0 < len(m.R) {
94                         v0 = m.R[j0]
95                 }
96                 buf.EncodeUint8(uint8(v0.IsPermit))
97                 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
98                 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 0)
99                 buf.EncodeUint8(uint8(v0.SrcPrefix.Len))
100                 buf.EncodeUint8(uint8(v0.DstPrefix.Address.Af))
101                 buf.EncodeBytes(v0.DstPrefix.Address.Un.XXX_UnionData[:], 0)
102                 buf.EncodeUint8(uint8(v0.DstPrefix.Len))
103                 buf.EncodeUint8(uint8(v0.Proto))
104                 buf.EncodeUint16(uint16(v0.SrcportOrIcmptypeFirst))
105                 buf.EncodeUint16(uint16(v0.SrcportOrIcmptypeLast))
106                 buf.EncodeUint16(uint16(v0.DstportOrIcmpcodeFirst))
107                 buf.EncodeUint16(uint16(v0.DstportOrIcmpcodeLast))
108                 buf.EncodeUint8(uint8(v0.TCPFlagsMask))
109                 buf.EncodeUint8(uint8(v0.TCPFlagsValue))
110         }
111         return buf.Bytes(), nil
112 }
113 func (m *ACLAddReplace) Unmarshal(b []byte) error {
114         buf := codec.NewBuffer(b)
115         m.ACLIndex = buf.DecodeUint32()
116         m.Tag = buf.DecodeString(64)
117         m.Count = buf.DecodeUint32()
118         m.R = make([]acl_types.ACLRule, int(m.Count))
119         for j0 := 0; j0 < len(m.R); j0++ {
120                 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
121                 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
122                 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
123                 m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
124                 m.R[j0].DstPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
125                 copy(m.R[j0].DstPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
126                 m.R[j0].DstPrefix.Len = buf.DecodeUint8()
127                 m.R[j0].Proto = ip_types.IPProto(buf.DecodeUint8())
128                 m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16()
129                 m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16()
130                 m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16()
131                 m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16()
132                 m.R[j0].TCPFlagsMask = buf.DecodeUint8()
133                 m.R[j0].TCPFlagsValue = buf.DecodeUint8()
134         }
135         return nil
136 }
137
138 // ACLAddReplaceReply defines message 'acl_add_replace_reply'.
139 type ACLAddReplaceReply struct {
140         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
141         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
142 }
143
144 func (m *ACLAddReplaceReply) Reset()               { *m = ACLAddReplaceReply{} }
145 func (*ACLAddReplaceReply) GetMessageName() string { return "acl_add_replace_reply" }
146 func (*ACLAddReplaceReply) GetCrcString() string   { return "ac407b0c" }
147 func (*ACLAddReplaceReply) GetMessageType() api.MessageType {
148         return api.ReplyMessage
149 }
150
151 func (m *ACLAddReplaceReply) Size() int {
152         if m == nil {
153                 return 0
154         }
155         var size int
156         size += 4 // m.ACLIndex
157         size += 4 // m.Retval
158         return size
159 }
160 func (m *ACLAddReplaceReply) 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.EncodeUint32(uint32(m.ACLIndex))
168         buf.EncodeUint32(uint32(m.Retval))
169         return buf.Bytes(), nil
170 }
171 func (m *ACLAddReplaceReply) Unmarshal(b []byte) error {
172         buf := codec.NewBuffer(b)
173         m.ACLIndex = buf.DecodeUint32()
174         m.Retval = int32(buf.DecodeUint32())
175         return nil
176 }
177
178 // ACLDel defines message 'acl_del'.
179 type ACLDel struct {
180         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
181 }
182
183 func (m *ACLDel) Reset()               { *m = ACLDel{} }
184 func (*ACLDel) GetMessageName() string { return "acl_del" }
185 func (*ACLDel) GetCrcString() string   { return "ef34fea4" }
186 func (*ACLDel) GetMessageType() api.MessageType {
187         return api.RequestMessage
188 }
189
190 func (m *ACLDel) Size() int {
191         if m == nil {
192                 return 0
193         }
194         var size int
195         size += 4 // m.ACLIndex
196         return size
197 }
198 func (m *ACLDel) Marshal(b []byte) ([]byte, error) {
199         var buf *codec.Buffer
200         if b == nil {
201                 buf = codec.NewBuffer(make([]byte, m.Size()))
202         } else {
203                 buf = codec.NewBuffer(b)
204         }
205         buf.EncodeUint32(uint32(m.ACLIndex))
206         return buf.Bytes(), nil
207 }
208 func (m *ACLDel) Unmarshal(b []byte) error {
209         buf := codec.NewBuffer(b)
210         m.ACLIndex = buf.DecodeUint32()
211         return nil
212 }
213
214 // ACLDelReply defines message 'acl_del_reply'.
215 type ACLDelReply struct {
216         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
217 }
218
219 func (m *ACLDelReply) Reset()               { *m = ACLDelReply{} }
220 func (*ACLDelReply) GetMessageName() string { return "acl_del_reply" }
221 func (*ACLDelReply) GetCrcString() string   { return "e8d4e804" }
222 func (*ACLDelReply) GetMessageType() api.MessageType {
223         return api.ReplyMessage
224 }
225
226 func (m *ACLDelReply) Size() int {
227         if m == nil {
228                 return 0
229         }
230         var size int
231         size += 4 // m.Retval
232         return size
233 }
234 func (m *ACLDelReply) Marshal(b []byte) ([]byte, error) {
235         var buf *codec.Buffer
236         if b == nil {
237                 buf = codec.NewBuffer(make([]byte, m.Size()))
238         } else {
239                 buf = codec.NewBuffer(b)
240         }
241         buf.EncodeUint32(uint32(m.Retval))
242         return buf.Bytes(), nil
243 }
244 func (m *ACLDelReply) Unmarshal(b []byte) error {
245         buf := codec.NewBuffer(b)
246         m.Retval = int32(buf.DecodeUint32())
247         return nil
248 }
249
250 // ACLDetails defines message 'acl_details'.
251 type ACLDetails struct {
252         ACLIndex uint32              `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
253         Tag      string              `binapi:"string[64],name=tag" json:"tag,omitempty"`
254         Count    uint32              `binapi:"u32,name=count" json:"-"`
255         R        []acl_types.ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
256 }
257
258 func (m *ACLDetails) Reset()               { *m = ACLDetails{} }
259 func (*ACLDetails) GetMessageName() string { return "acl_details" }
260 func (*ACLDetails) GetCrcString() string   { return "7a97f21c" }
261 func (*ACLDetails) GetMessageType() api.MessageType {
262         return api.ReplyMessage
263 }
264
265 func (m *ACLDetails) Size() int {
266         if m == nil {
267                 return 0
268         }
269         var size int
270         size += 4  // m.ACLIndex
271         size += 64 // m.Tag
272         size += 4  // m.Count
273         for j1 := 0; j1 < len(m.R); j1++ {
274                 var s1 acl_types.ACLRule
275                 _ = s1
276                 if j1 < len(m.R) {
277                         s1 = m.R[j1]
278                 }
279                 size += 1      // s1.IsPermit
280                 size += 1      // s1.SrcPrefix.Address.Af
281                 size += 1 * 16 // s1.SrcPrefix.Address.Un
282                 size += 1      // s1.SrcPrefix.Len
283                 size += 1      // s1.DstPrefix.Address.Af
284                 size += 1 * 16 // s1.DstPrefix.Address.Un
285                 size += 1      // s1.DstPrefix.Len
286                 size += 1      // s1.Proto
287                 size += 2      // s1.SrcportOrIcmptypeFirst
288                 size += 2      // s1.SrcportOrIcmptypeLast
289                 size += 2      // s1.DstportOrIcmpcodeFirst
290                 size += 2      // s1.DstportOrIcmpcodeLast
291                 size += 1      // s1.TCPFlagsMask
292                 size += 1      // s1.TCPFlagsValue
293         }
294         return size
295 }
296 func (m *ACLDetails) Marshal(b []byte) ([]byte, error) {
297         var buf *codec.Buffer
298         if b == nil {
299                 buf = codec.NewBuffer(make([]byte, m.Size()))
300         } else {
301                 buf = codec.NewBuffer(b)
302         }
303         buf.EncodeUint32(uint32(m.ACLIndex))
304         buf.EncodeString(m.Tag, 64)
305         buf.EncodeUint32(uint32(len(m.R)))
306         for j0 := 0; j0 < len(m.R); j0++ {
307                 var v0 acl_types.ACLRule
308                 if j0 < len(m.R) {
309                         v0 = m.R[j0]
310                 }
311                 buf.EncodeUint8(uint8(v0.IsPermit))
312                 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
313                 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 0)
314                 buf.EncodeUint8(uint8(v0.SrcPrefix.Len))
315                 buf.EncodeUint8(uint8(v0.DstPrefix.Address.Af))
316                 buf.EncodeBytes(v0.DstPrefix.Address.Un.XXX_UnionData[:], 0)
317                 buf.EncodeUint8(uint8(v0.DstPrefix.Len))
318                 buf.EncodeUint8(uint8(v0.Proto))
319                 buf.EncodeUint16(uint16(v0.SrcportOrIcmptypeFirst))
320                 buf.EncodeUint16(uint16(v0.SrcportOrIcmptypeLast))
321                 buf.EncodeUint16(uint16(v0.DstportOrIcmpcodeFirst))
322                 buf.EncodeUint16(uint16(v0.DstportOrIcmpcodeLast))
323                 buf.EncodeUint8(uint8(v0.TCPFlagsMask))
324                 buf.EncodeUint8(uint8(v0.TCPFlagsValue))
325         }
326         return buf.Bytes(), nil
327 }
328 func (m *ACLDetails) Unmarshal(b []byte) error {
329         buf := codec.NewBuffer(b)
330         m.ACLIndex = buf.DecodeUint32()
331         m.Tag = buf.DecodeString(64)
332         m.Count = buf.DecodeUint32()
333         m.R = make([]acl_types.ACLRule, int(m.Count))
334         for j0 := 0; j0 < len(m.R); j0++ {
335                 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
336                 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
337                 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
338                 m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
339                 m.R[j0].DstPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
340                 copy(m.R[j0].DstPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
341                 m.R[j0].DstPrefix.Len = buf.DecodeUint8()
342                 m.R[j0].Proto = ip_types.IPProto(buf.DecodeUint8())
343                 m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16()
344                 m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16()
345                 m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16()
346                 m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16()
347                 m.R[j0].TCPFlagsMask = buf.DecodeUint8()
348                 m.R[j0].TCPFlagsValue = buf.DecodeUint8()
349         }
350         return nil
351 }
352
353 // ACLDump defines message 'acl_dump'.
354 type ACLDump struct {
355         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
356 }
357
358 func (m *ACLDump) Reset()               { *m = ACLDump{} }
359 func (*ACLDump) GetMessageName() string { return "acl_dump" }
360 func (*ACLDump) GetCrcString() string   { return "ef34fea4" }
361 func (*ACLDump) GetMessageType() api.MessageType {
362         return api.RequestMessage
363 }
364
365 func (m *ACLDump) Size() int {
366         if m == nil {
367                 return 0
368         }
369         var size int
370         size += 4 // m.ACLIndex
371         return size
372 }
373 func (m *ACLDump) Marshal(b []byte) ([]byte, error) {
374         var buf *codec.Buffer
375         if b == nil {
376                 buf = codec.NewBuffer(make([]byte, m.Size()))
377         } else {
378                 buf = codec.NewBuffer(b)
379         }
380         buf.EncodeUint32(uint32(m.ACLIndex))
381         return buf.Bytes(), nil
382 }
383 func (m *ACLDump) Unmarshal(b []byte) error {
384         buf := codec.NewBuffer(b)
385         m.ACLIndex = buf.DecodeUint32()
386         return nil
387 }
388
389 // ACLInterfaceAddDel defines message 'acl_interface_add_del'.
390 type ACLInterfaceAddDel struct {
391         IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
392         IsInput   bool                           `binapi:"bool,name=is_input" json:"is_input,omitempty"`
393         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
394         ACLIndex  uint32                         `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
395 }
396
397 func (m *ACLInterfaceAddDel) Reset()               { *m = ACLInterfaceAddDel{} }
398 func (*ACLInterfaceAddDel) GetMessageName() string { return "acl_interface_add_del" }
399 func (*ACLInterfaceAddDel) GetCrcString() string   { return "4b54bebd" }
400 func (*ACLInterfaceAddDel) GetMessageType() api.MessageType {
401         return api.RequestMessage
402 }
403
404 func (m *ACLInterfaceAddDel) Size() int {
405         if m == nil {
406                 return 0
407         }
408         var size int
409         size += 1 // m.IsAdd
410         size += 1 // m.IsInput
411         size += 4 // m.SwIfIndex
412         size += 4 // m.ACLIndex
413         return size
414 }
415 func (m *ACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
416         var buf *codec.Buffer
417         if b == nil {
418                 buf = codec.NewBuffer(make([]byte, m.Size()))
419         } else {
420                 buf = codec.NewBuffer(b)
421         }
422         buf.EncodeBool(m.IsAdd)
423         buf.EncodeBool(m.IsInput)
424         buf.EncodeUint32(uint32(m.SwIfIndex))
425         buf.EncodeUint32(uint32(m.ACLIndex))
426         return buf.Bytes(), nil
427 }
428 func (m *ACLInterfaceAddDel) Unmarshal(b []byte) error {
429         buf := codec.NewBuffer(b)
430         m.IsAdd = buf.DecodeBool()
431         m.IsInput = buf.DecodeBool()
432         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
433         m.ACLIndex = buf.DecodeUint32()
434         return nil
435 }
436
437 // ACLInterfaceAddDelReply defines message 'acl_interface_add_del_reply'.
438 type ACLInterfaceAddDelReply struct {
439         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
440 }
441
442 func (m *ACLInterfaceAddDelReply) Reset()               { *m = ACLInterfaceAddDelReply{} }
443 func (*ACLInterfaceAddDelReply) GetMessageName() string { return "acl_interface_add_del_reply" }
444 func (*ACLInterfaceAddDelReply) GetCrcString() string   { return "e8d4e804" }
445 func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType {
446         return api.ReplyMessage
447 }
448
449 func (m *ACLInterfaceAddDelReply) Size() int {
450         if m == nil {
451                 return 0
452         }
453         var size int
454         size += 4 // m.Retval
455         return size
456 }
457 func (m *ACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
458         var buf *codec.Buffer
459         if b == nil {
460                 buf = codec.NewBuffer(make([]byte, m.Size()))
461         } else {
462                 buf = codec.NewBuffer(b)
463         }
464         buf.EncodeUint32(uint32(m.Retval))
465         return buf.Bytes(), nil
466 }
467 func (m *ACLInterfaceAddDelReply) Unmarshal(b []byte) error {
468         buf := codec.NewBuffer(b)
469         m.Retval = int32(buf.DecodeUint32())
470         return nil
471 }
472
473 // ACLInterfaceEtypeWhitelistDetails defines message 'acl_interface_etype_whitelist_details'.
474 type ACLInterfaceEtypeWhitelistDetails struct {
475         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
476         Count     uint8                          `binapi:"u8,name=count" json:"-"`
477         NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
478         Whitelist []uint16                       `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
479 }
480
481 func (m *ACLInterfaceEtypeWhitelistDetails) Reset() { *m = ACLInterfaceEtypeWhitelistDetails{} }
482 func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string {
483         return "acl_interface_etype_whitelist_details"
484 }
485 func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string { return "cc2bfded" }
486 func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType {
487         return api.ReplyMessage
488 }
489
490 func (m *ACLInterfaceEtypeWhitelistDetails) Size() int {
491         if m == nil {
492                 return 0
493         }
494         var size int
495         size += 4                    // m.SwIfIndex
496         size += 1                    // m.Count
497         size += 1                    // m.NInput
498         size += 2 * len(m.Whitelist) // m.Whitelist
499         return size
500 }
501 func (m *ACLInterfaceEtypeWhitelistDetails) Marshal(b []byte) ([]byte, error) {
502         var buf *codec.Buffer
503         if b == nil {
504                 buf = codec.NewBuffer(make([]byte, m.Size()))
505         } else {
506                 buf = codec.NewBuffer(b)
507         }
508         buf.EncodeUint32(uint32(m.SwIfIndex))
509         buf.EncodeUint8(uint8(len(m.Whitelist)))
510         buf.EncodeUint8(uint8(m.NInput))
511         for i := 0; i < len(m.Whitelist); i++ {
512                 var x uint16
513                 if i < len(m.Whitelist) {
514                         x = uint16(m.Whitelist[i])
515                 }
516                 buf.EncodeUint16(uint16(x))
517         }
518         return buf.Bytes(), nil
519 }
520 func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(b []byte) error {
521         buf := codec.NewBuffer(b)
522         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
523         m.Count = buf.DecodeUint8()
524         m.NInput = buf.DecodeUint8()
525         m.Whitelist = make([]uint16, m.Count)
526         for i := 0; i < len(m.Whitelist); i++ {
527                 m.Whitelist[i] = buf.DecodeUint16()
528         }
529         return nil
530 }
531
532 // ACLInterfaceEtypeWhitelistDump defines message 'acl_interface_etype_whitelist_dump'.
533 type ACLInterfaceEtypeWhitelistDump struct {
534         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
535 }
536
537 func (m *ACLInterfaceEtypeWhitelistDump) Reset() { *m = ACLInterfaceEtypeWhitelistDump{} }
538 func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string {
539         return "acl_interface_etype_whitelist_dump"
540 }
541 func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string { return "f9e6675e" }
542 func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType {
543         return api.RequestMessage
544 }
545
546 func (m *ACLInterfaceEtypeWhitelistDump) Size() int {
547         if m == nil {
548                 return 0
549         }
550         var size int
551         size += 4 // m.SwIfIndex
552         return size
553 }
554 func (m *ACLInterfaceEtypeWhitelistDump) Marshal(b []byte) ([]byte, error) {
555         var buf *codec.Buffer
556         if b == nil {
557                 buf = codec.NewBuffer(make([]byte, m.Size()))
558         } else {
559                 buf = codec.NewBuffer(b)
560         }
561         buf.EncodeUint32(uint32(m.SwIfIndex))
562         return buf.Bytes(), nil
563 }
564 func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(b []byte) error {
565         buf := codec.NewBuffer(b)
566         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
567         return nil
568 }
569
570 // ACLInterfaceListDetails defines message 'acl_interface_list_details'.
571 type ACLInterfaceListDetails struct {
572         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
573         Count     uint8                          `binapi:"u8,name=count" json:"-"`
574         NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
575         Acls      []uint32                       `binapi:"u32[count],name=acls" json:"acls,omitempty"`
576 }
577
578 func (m *ACLInterfaceListDetails) Reset()               { *m = ACLInterfaceListDetails{} }
579 func (*ACLInterfaceListDetails) GetMessageName() string { return "acl_interface_list_details" }
580 func (*ACLInterfaceListDetails) GetCrcString() string   { return "e695d256" }
581 func (*ACLInterfaceListDetails) GetMessageType() api.MessageType {
582         return api.ReplyMessage
583 }
584
585 func (m *ACLInterfaceListDetails) Size() int {
586         if m == nil {
587                 return 0
588         }
589         var size int
590         size += 4               // m.SwIfIndex
591         size += 1               // m.Count
592         size += 1               // m.NInput
593         size += 4 * len(m.Acls) // m.Acls
594         return size
595 }
596 func (m *ACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
597         var buf *codec.Buffer
598         if b == nil {
599                 buf = codec.NewBuffer(make([]byte, m.Size()))
600         } else {
601                 buf = codec.NewBuffer(b)
602         }
603         buf.EncodeUint32(uint32(m.SwIfIndex))
604         buf.EncodeUint8(uint8(len(m.Acls)))
605         buf.EncodeUint8(uint8(m.NInput))
606         for i := 0; i < len(m.Acls); i++ {
607                 var x uint32
608                 if i < len(m.Acls) {
609                         x = uint32(m.Acls[i])
610                 }
611                 buf.EncodeUint32(uint32(x))
612         }
613         return buf.Bytes(), nil
614 }
615 func (m *ACLInterfaceListDetails) Unmarshal(b []byte) error {
616         buf := codec.NewBuffer(b)
617         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
618         m.Count = buf.DecodeUint8()
619         m.NInput = buf.DecodeUint8()
620         m.Acls = make([]uint32, m.Count)
621         for i := 0; i < len(m.Acls); i++ {
622                 m.Acls[i] = buf.DecodeUint32()
623         }
624         return nil
625 }
626
627 // ACLInterfaceListDump defines message 'acl_interface_list_dump'.
628 type ACLInterfaceListDump struct {
629         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
630 }
631
632 func (m *ACLInterfaceListDump) Reset()               { *m = ACLInterfaceListDump{} }
633 func (*ACLInterfaceListDump) GetMessageName() string { return "acl_interface_list_dump" }
634 func (*ACLInterfaceListDump) GetCrcString() string   { return "f9e6675e" }
635 func (*ACLInterfaceListDump) GetMessageType() api.MessageType {
636         return api.RequestMessage
637 }
638
639 func (m *ACLInterfaceListDump) Size() int {
640         if m == nil {
641                 return 0
642         }
643         var size int
644         size += 4 // m.SwIfIndex
645         return size
646 }
647 func (m *ACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
648         var buf *codec.Buffer
649         if b == nil {
650                 buf = codec.NewBuffer(make([]byte, m.Size()))
651         } else {
652                 buf = codec.NewBuffer(b)
653         }
654         buf.EncodeUint32(uint32(m.SwIfIndex))
655         return buf.Bytes(), nil
656 }
657 func (m *ACLInterfaceListDump) Unmarshal(b []byte) error {
658         buf := codec.NewBuffer(b)
659         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
660         return nil
661 }
662
663 // ACLInterfaceSetACLList defines message 'acl_interface_set_acl_list'.
664 type ACLInterfaceSetACLList struct {
665         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
666         Count     uint8                          `binapi:"u8,name=count" json:"-"`
667         NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
668         Acls      []uint32                       `binapi:"u32[count],name=acls" json:"acls,omitempty"`
669 }
670
671 func (m *ACLInterfaceSetACLList) Reset()               { *m = ACLInterfaceSetACLList{} }
672 func (*ACLInterfaceSetACLList) GetMessageName() string { return "acl_interface_set_acl_list" }
673 func (*ACLInterfaceSetACLList) GetCrcString() string   { return "473982bd" }
674 func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType {
675         return api.RequestMessage
676 }
677
678 func (m *ACLInterfaceSetACLList) Size() int {
679         if m == nil {
680                 return 0
681         }
682         var size int
683         size += 4               // m.SwIfIndex
684         size += 1               // m.Count
685         size += 1               // m.NInput
686         size += 4 * len(m.Acls) // m.Acls
687         return size
688 }
689 func (m *ACLInterfaceSetACLList) Marshal(b []byte) ([]byte, error) {
690         var buf *codec.Buffer
691         if b == nil {
692                 buf = codec.NewBuffer(make([]byte, m.Size()))
693         } else {
694                 buf = codec.NewBuffer(b)
695         }
696         buf.EncodeUint32(uint32(m.SwIfIndex))
697         buf.EncodeUint8(uint8(len(m.Acls)))
698         buf.EncodeUint8(uint8(m.NInput))
699         for i := 0; i < len(m.Acls); i++ {
700                 var x uint32
701                 if i < len(m.Acls) {
702                         x = uint32(m.Acls[i])
703                 }
704                 buf.EncodeUint32(uint32(x))
705         }
706         return buf.Bytes(), nil
707 }
708 func (m *ACLInterfaceSetACLList) Unmarshal(b []byte) error {
709         buf := codec.NewBuffer(b)
710         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
711         m.Count = buf.DecodeUint8()
712         m.NInput = buf.DecodeUint8()
713         m.Acls = make([]uint32, m.Count)
714         for i := 0; i < len(m.Acls); i++ {
715                 m.Acls[i] = buf.DecodeUint32()
716         }
717         return nil
718 }
719
720 // ACLInterfaceSetACLListReply defines message 'acl_interface_set_acl_list_reply'.
721 type ACLInterfaceSetACLListReply struct {
722         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
723 }
724
725 func (m *ACLInterfaceSetACLListReply) Reset() { *m = ACLInterfaceSetACLListReply{} }
726 func (*ACLInterfaceSetACLListReply) GetMessageName() string {
727         return "acl_interface_set_acl_list_reply"
728 }
729 func (*ACLInterfaceSetACLListReply) GetCrcString() string { return "e8d4e804" }
730 func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType {
731         return api.ReplyMessage
732 }
733
734 func (m *ACLInterfaceSetACLListReply) Size() int {
735         if m == nil {
736                 return 0
737         }
738         var size int
739         size += 4 // m.Retval
740         return size
741 }
742 func (m *ACLInterfaceSetACLListReply) Marshal(b []byte) ([]byte, error) {
743         var buf *codec.Buffer
744         if b == nil {
745                 buf = codec.NewBuffer(make([]byte, m.Size()))
746         } else {
747                 buf = codec.NewBuffer(b)
748         }
749         buf.EncodeUint32(uint32(m.Retval))
750         return buf.Bytes(), nil
751 }
752 func (m *ACLInterfaceSetACLListReply) Unmarshal(b []byte) error {
753         buf := codec.NewBuffer(b)
754         m.Retval = int32(buf.DecodeUint32())
755         return nil
756 }
757
758 // ACLInterfaceSetEtypeWhitelist defines message 'acl_interface_set_etype_whitelist'.
759 type ACLInterfaceSetEtypeWhitelist struct {
760         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
761         Count     uint8                          `binapi:"u8,name=count" json:"-"`
762         NInput    uint8                          `binapi:"u8,name=n_input" json:"n_input,omitempty"`
763         Whitelist []uint16                       `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
764 }
765
766 func (m *ACLInterfaceSetEtypeWhitelist) Reset() { *m = ACLInterfaceSetEtypeWhitelist{} }
767 func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string {
768         return "acl_interface_set_etype_whitelist"
769 }
770 func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string { return "3f5c2d2d" }
771 func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType {
772         return api.RequestMessage
773 }
774
775 func (m *ACLInterfaceSetEtypeWhitelist) Size() int {
776         if m == nil {
777                 return 0
778         }
779         var size int
780         size += 4                    // m.SwIfIndex
781         size += 1                    // m.Count
782         size += 1                    // m.NInput
783         size += 2 * len(m.Whitelist) // m.Whitelist
784         return size
785 }
786 func (m *ACLInterfaceSetEtypeWhitelist) Marshal(b []byte) ([]byte, error) {
787         var buf *codec.Buffer
788         if b == nil {
789                 buf = codec.NewBuffer(make([]byte, m.Size()))
790         } else {
791                 buf = codec.NewBuffer(b)
792         }
793         buf.EncodeUint32(uint32(m.SwIfIndex))
794         buf.EncodeUint8(uint8(len(m.Whitelist)))
795         buf.EncodeUint8(uint8(m.NInput))
796         for i := 0; i < len(m.Whitelist); i++ {
797                 var x uint16
798                 if i < len(m.Whitelist) {
799                         x = uint16(m.Whitelist[i])
800                 }
801                 buf.EncodeUint16(uint16(x))
802         }
803         return buf.Bytes(), nil
804 }
805 func (m *ACLInterfaceSetEtypeWhitelist) Unmarshal(b []byte) error {
806         buf := codec.NewBuffer(b)
807         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
808         m.Count = buf.DecodeUint8()
809         m.NInput = buf.DecodeUint8()
810         m.Whitelist = make([]uint16, m.Count)
811         for i := 0; i < len(m.Whitelist); i++ {
812                 m.Whitelist[i] = buf.DecodeUint16()
813         }
814         return nil
815 }
816
817 // ACLInterfaceSetEtypeWhitelistReply defines message 'acl_interface_set_etype_whitelist_reply'.
818 type ACLInterfaceSetEtypeWhitelistReply struct {
819         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
820 }
821
822 func (m *ACLInterfaceSetEtypeWhitelistReply) Reset() { *m = ACLInterfaceSetEtypeWhitelistReply{} }
823 func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string {
824         return "acl_interface_set_etype_whitelist_reply"
825 }
826 func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string { return "e8d4e804" }
827 func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType {
828         return api.ReplyMessage
829 }
830
831 func (m *ACLInterfaceSetEtypeWhitelistReply) Size() int {
832         if m == nil {
833                 return 0
834         }
835         var size int
836         size += 4 // m.Retval
837         return size
838 }
839 func (m *ACLInterfaceSetEtypeWhitelistReply) Marshal(b []byte) ([]byte, error) {
840         var buf *codec.Buffer
841         if b == nil {
842                 buf = codec.NewBuffer(make([]byte, m.Size()))
843         } else {
844                 buf = codec.NewBuffer(b)
845         }
846         buf.EncodeUint32(uint32(m.Retval))
847         return buf.Bytes(), nil
848 }
849 func (m *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(b []byte) error {
850         buf := codec.NewBuffer(b)
851         m.Retval = int32(buf.DecodeUint32())
852         return nil
853 }
854
855 // ACLPluginControlPing defines message 'acl_plugin_control_ping'.
856 type ACLPluginControlPing struct{}
857
858 func (m *ACLPluginControlPing) Reset()               { *m = ACLPluginControlPing{} }
859 func (*ACLPluginControlPing) GetMessageName() string { return "acl_plugin_control_ping" }
860 func (*ACLPluginControlPing) GetCrcString() string   { return "51077d14" }
861 func (*ACLPluginControlPing) GetMessageType() api.MessageType {
862         return api.RequestMessage
863 }
864
865 func (m *ACLPluginControlPing) Size() int {
866         if m == nil {
867                 return 0
868         }
869         var size int
870         return size
871 }
872 func (m *ACLPluginControlPing) Marshal(b []byte) ([]byte, error) {
873         var buf *codec.Buffer
874         if b == nil {
875                 buf = codec.NewBuffer(make([]byte, m.Size()))
876         } else {
877                 buf = codec.NewBuffer(b)
878         }
879         return buf.Bytes(), nil
880 }
881 func (m *ACLPluginControlPing) Unmarshal(b []byte) error {
882         return nil
883 }
884
885 // ACLPluginControlPingReply defines message 'acl_plugin_control_ping_reply'.
886 type ACLPluginControlPingReply struct {
887         Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
888         ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
889         VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
890 }
891
892 func (m *ACLPluginControlPingReply) Reset()               { *m = ACLPluginControlPingReply{} }
893 func (*ACLPluginControlPingReply) GetMessageName() string { return "acl_plugin_control_ping_reply" }
894 func (*ACLPluginControlPingReply) GetCrcString() string   { return "f6b0b8ca" }
895 func (*ACLPluginControlPingReply) GetMessageType() api.MessageType {
896         return api.ReplyMessage
897 }
898
899 func (m *ACLPluginControlPingReply) Size() int {
900         if m == nil {
901                 return 0
902         }
903         var size int
904         size += 4 // m.Retval
905         size += 4 // m.ClientIndex
906         size += 4 // m.VpePID
907         return size
908 }
909 func (m *ACLPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
910         var buf *codec.Buffer
911         if b == nil {
912                 buf = codec.NewBuffer(make([]byte, m.Size()))
913         } else {
914                 buf = codec.NewBuffer(b)
915         }
916         buf.EncodeUint32(uint32(m.Retval))
917         buf.EncodeUint32(uint32(m.ClientIndex))
918         buf.EncodeUint32(uint32(m.VpePID))
919         return buf.Bytes(), nil
920 }
921 func (m *ACLPluginControlPingReply) Unmarshal(b []byte) error {
922         buf := codec.NewBuffer(b)
923         m.Retval = int32(buf.DecodeUint32())
924         m.ClientIndex = buf.DecodeUint32()
925         m.VpePID = buf.DecodeUint32()
926         return nil
927 }
928
929 // ACLPluginGetConnTableMaxEntries defines message 'acl_plugin_get_conn_table_max_entries'.
930 type ACLPluginGetConnTableMaxEntries struct{}
931
932 func (m *ACLPluginGetConnTableMaxEntries) Reset() { *m = ACLPluginGetConnTableMaxEntries{} }
933 func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string {
934         return "acl_plugin_get_conn_table_max_entries"
935 }
936 func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string { return "51077d14" }
937 func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType {
938         return api.RequestMessage
939 }
940
941 func (m *ACLPluginGetConnTableMaxEntries) Size() int {
942         if m == nil {
943                 return 0
944         }
945         var size int
946         return size
947 }
948 func (m *ACLPluginGetConnTableMaxEntries) Marshal(b []byte) ([]byte, error) {
949         var buf *codec.Buffer
950         if b == nil {
951                 buf = codec.NewBuffer(make([]byte, m.Size()))
952         } else {
953                 buf = codec.NewBuffer(b)
954         }
955         return buf.Bytes(), nil
956 }
957 func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(b []byte) error {
958         return nil
959 }
960
961 // ACLPluginGetConnTableMaxEntriesReply defines message 'acl_plugin_get_conn_table_max_entries_reply'.
962 type ACLPluginGetConnTableMaxEntriesReply struct {
963         ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"`
964 }
965
966 func (m *ACLPluginGetConnTableMaxEntriesReply) Reset() { *m = ACLPluginGetConnTableMaxEntriesReply{} }
967 func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageName() string {
968         return "acl_plugin_get_conn_table_max_entries_reply"
969 }
970 func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string { return "7a096d3d" }
971 func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType {
972         return api.ReplyMessage
973 }
974
975 func (m *ACLPluginGetConnTableMaxEntriesReply) Size() int {
976         if m == nil {
977                 return 0
978         }
979         var size int
980         size += 8 // m.ConnTableMaxEntries
981         return size
982 }
983 func (m *ACLPluginGetConnTableMaxEntriesReply) Marshal(b []byte) ([]byte, error) {
984         var buf *codec.Buffer
985         if b == nil {
986                 buf = codec.NewBuffer(make([]byte, m.Size()))
987         } else {
988                 buf = codec.NewBuffer(b)
989         }
990         buf.EncodeUint64(uint64(m.ConnTableMaxEntries))
991         return buf.Bytes(), nil
992 }
993 func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(b []byte) error {
994         buf := codec.NewBuffer(b)
995         m.ConnTableMaxEntries = buf.DecodeUint64()
996         return nil
997 }
998
999 // ACLPluginGetVersion defines message 'acl_plugin_get_version'.
1000 type ACLPluginGetVersion struct{}
1001
1002 func (m *ACLPluginGetVersion) Reset()               { *m = ACLPluginGetVersion{} }
1003 func (*ACLPluginGetVersion) GetMessageName() string { return "acl_plugin_get_version" }
1004 func (*ACLPluginGetVersion) GetCrcString() string   { return "51077d14" }
1005 func (*ACLPluginGetVersion) GetMessageType() api.MessageType {
1006         return api.RequestMessage
1007 }
1008
1009 func (m *ACLPluginGetVersion) Size() int {
1010         if m == nil {
1011                 return 0
1012         }
1013         var size int
1014         return size
1015 }
1016 func (m *ACLPluginGetVersion) Marshal(b []byte) ([]byte, error) {
1017         var buf *codec.Buffer
1018         if b == nil {
1019                 buf = codec.NewBuffer(make([]byte, m.Size()))
1020         } else {
1021                 buf = codec.NewBuffer(b)
1022         }
1023         return buf.Bytes(), nil
1024 }
1025 func (m *ACLPluginGetVersion) Unmarshal(b []byte) error {
1026         return nil
1027 }
1028
1029 // ACLPluginGetVersionReply defines message 'acl_plugin_get_version_reply'.
1030 type ACLPluginGetVersionReply struct {
1031         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
1032         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
1033 }
1034
1035 func (m *ACLPluginGetVersionReply) Reset()               { *m = ACLPluginGetVersionReply{} }
1036 func (*ACLPluginGetVersionReply) GetMessageName() string { return "acl_plugin_get_version_reply" }
1037 func (*ACLPluginGetVersionReply) GetCrcString() string   { return "9b32cf86" }
1038 func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType {
1039         return api.ReplyMessage
1040 }
1041
1042 func (m *ACLPluginGetVersionReply) Size() int {
1043         if m == nil {
1044                 return 0
1045         }
1046         var size int
1047         size += 4 // m.Major
1048         size += 4 // m.Minor
1049         return size
1050 }
1051 func (m *ACLPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
1052         var buf *codec.Buffer
1053         if b == nil {
1054                 buf = codec.NewBuffer(make([]byte, m.Size()))
1055         } else {
1056                 buf = codec.NewBuffer(b)
1057         }
1058         buf.EncodeUint32(uint32(m.Major))
1059         buf.EncodeUint32(uint32(m.Minor))
1060         return buf.Bytes(), nil
1061 }
1062 func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error {
1063         buf := codec.NewBuffer(b)
1064         m.Major = buf.DecodeUint32()
1065         m.Minor = buf.DecodeUint32()
1066         return nil
1067 }
1068
1069 // ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'.
1070 type ACLStatsIntfCountersEnable struct {
1071         Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
1072 }
1073
1074 func (m *ACLStatsIntfCountersEnable) Reset()               { *m = ACLStatsIntfCountersEnable{} }
1075 func (*ACLStatsIntfCountersEnable) GetMessageName() string { return "acl_stats_intf_counters_enable" }
1076 func (*ACLStatsIntfCountersEnable) GetCrcString() string   { return "b3e225d2" }
1077 func (*ACLStatsIntfCountersEnable) GetMessageType() api.MessageType {
1078         return api.RequestMessage
1079 }
1080
1081 func (m *ACLStatsIntfCountersEnable) Size() int {
1082         if m == nil {
1083                 return 0
1084         }
1085         var size int
1086         size += 1 // m.Enable
1087         return size
1088 }
1089 func (m *ACLStatsIntfCountersEnable) Marshal(b []byte) ([]byte, error) {
1090         var buf *codec.Buffer
1091         if b == nil {
1092                 buf = codec.NewBuffer(make([]byte, m.Size()))
1093         } else {
1094                 buf = codec.NewBuffer(b)
1095         }
1096         buf.EncodeBool(m.Enable)
1097         return buf.Bytes(), nil
1098 }
1099 func (m *ACLStatsIntfCountersEnable) Unmarshal(b []byte) error {
1100         buf := codec.NewBuffer(b)
1101         m.Enable = buf.DecodeBool()
1102         return nil
1103 }
1104
1105 // ACLStatsIntfCountersEnableReply defines message 'acl_stats_intf_counters_enable_reply'.
1106 type ACLStatsIntfCountersEnableReply struct {
1107         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1108 }
1109
1110 func (m *ACLStatsIntfCountersEnableReply) Reset() { *m = ACLStatsIntfCountersEnableReply{} }
1111 func (*ACLStatsIntfCountersEnableReply) GetMessageName() string {
1112         return "acl_stats_intf_counters_enable_reply"
1113 }
1114 func (*ACLStatsIntfCountersEnableReply) GetCrcString() string { return "e8d4e804" }
1115 func (*ACLStatsIntfCountersEnableReply) GetMessageType() api.MessageType {
1116         return api.ReplyMessage
1117 }
1118
1119 func (m *ACLStatsIntfCountersEnableReply) Size() int {
1120         if m == nil {
1121                 return 0
1122         }
1123         var size int
1124         size += 4 // m.Retval
1125         return size
1126 }
1127 func (m *ACLStatsIntfCountersEnableReply) Marshal(b []byte) ([]byte, error) {
1128         var buf *codec.Buffer
1129         if b == nil {
1130                 buf = codec.NewBuffer(make([]byte, m.Size()))
1131         } else {
1132                 buf = codec.NewBuffer(b)
1133         }
1134         buf.EncodeUint32(uint32(m.Retval))
1135         return buf.Bytes(), nil
1136 }
1137 func (m *ACLStatsIntfCountersEnableReply) Unmarshal(b []byte) error {
1138         buf := codec.NewBuffer(b)
1139         m.Retval = int32(buf.DecodeUint32())
1140         return nil
1141 }
1142
1143 // MacipACLAdd defines message 'macip_acl_add'.
1144 type MacipACLAdd struct {
1145         Tag   string                   `binapi:"string[64],name=tag" json:"tag,omitempty"`
1146         Count uint32                   `binapi:"u32,name=count" json:"-"`
1147         R     []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
1148 }
1149
1150 func (m *MacipACLAdd) Reset()               { *m = MacipACLAdd{} }
1151 func (*MacipACLAdd) GetMessageName() string { return "macip_acl_add" }
1152 func (*MacipACLAdd) GetCrcString() string   { return "d648fd0a" }
1153 func (*MacipACLAdd) GetMessageType() api.MessageType {
1154         return api.RequestMessage
1155 }
1156
1157 func (m *MacipACLAdd) Size() int {
1158         if m == nil {
1159                 return 0
1160         }
1161         var size int
1162         size += 64 // m.Tag
1163         size += 4  // m.Count
1164         for j1 := 0; j1 < len(m.R); j1++ {
1165                 var s1 acl_types.MacipACLRule
1166                 _ = s1
1167                 if j1 < len(m.R) {
1168                         s1 = m.R[j1]
1169                 }
1170                 size += 1      // s1.IsPermit
1171                 size += 1 * 6  // s1.SrcMac
1172                 size += 1 * 6  // s1.SrcMacMask
1173                 size += 1      // s1.SrcPrefix.Address.Af
1174                 size += 1 * 16 // s1.SrcPrefix.Address.Un
1175                 size += 1      // s1.SrcPrefix.Len
1176         }
1177         return size
1178 }
1179 func (m *MacipACLAdd) Marshal(b []byte) ([]byte, error) {
1180         var buf *codec.Buffer
1181         if b == nil {
1182                 buf = codec.NewBuffer(make([]byte, m.Size()))
1183         } else {
1184                 buf = codec.NewBuffer(b)
1185         }
1186         buf.EncodeString(m.Tag, 64)
1187         buf.EncodeUint32(uint32(len(m.R)))
1188         for j0 := 0; j0 < len(m.R); j0++ {
1189                 var v0 acl_types.MacipACLRule
1190                 if j0 < len(m.R) {
1191                         v0 = m.R[j0]
1192                 }
1193                 buf.EncodeUint8(uint8(v0.IsPermit))
1194                 buf.EncodeBytes(v0.SrcMac[:], 6)
1195                 buf.EncodeBytes(v0.SrcMacMask[:], 6)
1196                 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
1197                 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 0)
1198                 buf.EncodeUint8(uint8(v0.SrcPrefix.Len))
1199         }
1200         return buf.Bytes(), nil
1201 }
1202 func (m *MacipACLAdd) Unmarshal(b []byte) error {
1203         buf := codec.NewBuffer(b)
1204         m.Tag = buf.DecodeString(64)
1205         m.Count = buf.DecodeUint32()
1206         m.R = make([]acl_types.MacipACLRule, int(m.Count))
1207         for j0 := 0; j0 < len(m.R); j0++ {
1208                 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
1209                 copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6))
1210                 copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6))
1211                 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1212                 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1213                 m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
1214         }
1215         return nil
1216 }
1217
1218 // MacipACLAddReplace defines message 'macip_acl_add_replace'.
1219 type MacipACLAddReplace struct {
1220         ACLIndex uint32                   `binapi:"u32,name=acl_index,default=%!s(float64=4.294967295e+09)" json:"acl_index,omitempty"`
1221         Tag      string                   `binapi:"string[64],name=tag" json:"tag,omitempty"`
1222         Count    uint32                   `binapi:"u32,name=count" json:"-"`
1223         R        []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
1224 }
1225
1226 func (m *MacipACLAddReplace) Reset()               { *m = MacipACLAddReplace{} }
1227 func (*MacipACLAddReplace) GetMessageName() string { return "macip_acl_add_replace" }
1228 func (*MacipACLAddReplace) GetCrcString() string   { return "e34402a7" }
1229 func (*MacipACLAddReplace) GetMessageType() api.MessageType {
1230         return api.RequestMessage
1231 }
1232
1233 func (m *MacipACLAddReplace) Size() int {
1234         if m == nil {
1235                 return 0
1236         }
1237         var size int
1238         size += 4  // m.ACLIndex
1239         size += 64 // m.Tag
1240         size += 4  // m.Count
1241         for j1 := 0; j1 < len(m.R); j1++ {
1242                 var s1 acl_types.MacipACLRule
1243                 _ = s1
1244                 if j1 < len(m.R) {
1245                         s1 = m.R[j1]
1246                 }
1247                 size += 1      // s1.IsPermit
1248                 size += 1 * 6  // s1.SrcMac
1249                 size += 1 * 6  // s1.SrcMacMask
1250                 size += 1      // s1.SrcPrefix.Address.Af
1251                 size += 1 * 16 // s1.SrcPrefix.Address.Un
1252                 size += 1      // s1.SrcPrefix.Len
1253         }
1254         return size
1255 }
1256 func (m *MacipACLAddReplace) Marshal(b []byte) ([]byte, error) {
1257         var buf *codec.Buffer
1258         if b == nil {
1259                 buf = codec.NewBuffer(make([]byte, m.Size()))
1260         } else {
1261                 buf = codec.NewBuffer(b)
1262         }
1263         buf.EncodeUint32(uint32(m.ACLIndex))
1264         buf.EncodeString(m.Tag, 64)
1265         buf.EncodeUint32(uint32(len(m.R)))
1266         for j0 := 0; j0 < len(m.R); j0++ {
1267                 var v0 acl_types.MacipACLRule
1268                 if j0 < len(m.R) {
1269                         v0 = m.R[j0]
1270                 }
1271                 buf.EncodeUint8(uint8(v0.IsPermit))
1272                 buf.EncodeBytes(v0.SrcMac[:], 6)
1273                 buf.EncodeBytes(v0.SrcMacMask[:], 6)
1274                 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
1275                 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 0)
1276                 buf.EncodeUint8(uint8(v0.SrcPrefix.Len))
1277         }
1278         return buf.Bytes(), nil
1279 }
1280 func (m *MacipACLAddReplace) Unmarshal(b []byte) error {
1281         buf := codec.NewBuffer(b)
1282         m.ACLIndex = buf.DecodeUint32()
1283         m.Tag = buf.DecodeString(64)
1284         m.Count = buf.DecodeUint32()
1285         m.R = make([]acl_types.MacipACLRule, int(m.Count))
1286         for j0 := 0; j0 < len(m.R); j0++ {
1287                 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
1288                 copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6))
1289                 copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6))
1290                 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1291                 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1292                 m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
1293         }
1294         return nil
1295 }
1296
1297 // MacipACLAddReplaceReply defines message 'macip_acl_add_replace_reply'.
1298 type MacipACLAddReplaceReply struct {
1299         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
1300         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1301 }
1302
1303 func (m *MacipACLAddReplaceReply) Reset()               { *m = MacipACLAddReplaceReply{} }
1304 func (*MacipACLAddReplaceReply) GetMessageName() string { return "macip_acl_add_replace_reply" }
1305 func (*MacipACLAddReplaceReply) GetCrcString() string   { return "ac407b0c" }
1306 func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType {
1307         return api.ReplyMessage
1308 }
1309
1310 func (m *MacipACLAddReplaceReply) Size() int {
1311         if m == nil {
1312                 return 0
1313         }
1314         var size int
1315         size += 4 // m.ACLIndex
1316         size += 4 // m.Retval
1317         return size
1318 }
1319 func (m *MacipACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
1320         var buf *codec.Buffer
1321         if b == nil {
1322                 buf = codec.NewBuffer(make([]byte, m.Size()))
1323         } else {
1324                 buf = codec.NewBuffer(b)
1325         }
1326         buf.EncodeUint32(uint32(m.ACLIndex))
1327         buf.EncodeUint32(uint32(m.Retval))
1328         return buf.Bytes(), nil
1329 }
1330 func (m *MacipACLAddReplaceReply) Unmarshal(b []byte) error {
1331         buf := codec.NewBuffer(b)
1332         m.ACLIndex = buf.DecodeUint32()
1333         m.Retval = int32(buf.DecodeUint32())
1334         return nil
1335 }
1336
1337 // MacipACLAddReply defines message 'macip_acl_add_reply'.
1338 type MacipACLAddReply struct {
1339         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
1340         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1341 }
1342
1343 func (m *MacipACLAddReply) Reset()               { *m = MacipACLAddReply{} }
1344 func (*MacipACLAddReply) GetMessageName() string { return "macip_acl_add_reply" }
1345 func (*MacipACLAddReply) GetCrcString() string   { return "ac407b0c" }
1346 func (*MacipACLAddReply) GetMessageType() api.MessageType {
1347         return api.ReplyMessage
1348 }
1349
1350 func (m *MacipACLAddReply) Size() int {
1351         if m == nil {
1352                 return 0
1353         }
1354         var size int
1355         size += 4 // m.ACLIndex
1356         size += 4 // m.Retval
1357         return size
1358 }
1359 func (m *MacipACLAddReply) Marshal(b []byte) ([]byte, error) {
1360         var buf *codec.Buffer
1361         if b == nil {
1362                 buf = codec.NewBuffer(make([]byte, m.Size()))
1363         } else {
1364                 buf = codec.NewBuffer(b)
1365         }
1366         buf.EncodeUint32(uint32(m.ACLIndex))
1367         buf.EncodeUint32(uint32(m.Retval))
1368         return buf.Bytes(), nil
1369 }
1370 func (m *MacipACLAddReply) Unmarshal(b []byte) error {
1371         buf := codec.NewBuffer(b)
1372         m.ACLIndex = buf.DecodeUint32()
1373         m.Retval = int32(buf.DecodeUint32())
1374         return nil
1375 }
1376
1377 // MacipACLDel defines message 'macip_acl_del'.
1378 type MacipACLDel struct {
1379         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
1380 }
1381
1382 func (m *MacipACLDel) Reset()               { *m = MacipACLDel{} }
1383 func (*MacipACLDel) GetMessageName() string { return "macip_acl_del" }
1384 func (*MacipACLDel) GetCrcString() string   { return "ef34fea4" }
1385 func (*MacipACLDel) GetMessageType() api.MessageType {
1386         return api.RequestMessage
1387 }
1388
1389 func (m *MacipACLDel) Size() int {
1390         if m == nil {
1391                 return 0
1392         }
1393         var size int
1394         size += 4 // m.ACLIndex
1395         return size
1396 }
1397 func (m *MacipACLDel) Marshal(b []byte) ([]byte, error) {
1398         var buf *codec.Buffer
1399         if b == nil {
1400                 buf = codec.NewBuffer(make([]byte, m.Size()))
1401         } else {
1402                 buf = codec.NewBuffer(b)
1403         }
1404         buf.EncodeUint32(uint32(m.ACLIndex))
1405         return buf.Bytes(), nil
1406 }
1407 func (m *MacipACLDel) Unmarshal(b []byte) error {
1408         buf := codec.NewBuffer(b)
1409         m.ACLIndex = buf.DecodeUint32()
1410         return nil
1411 }
1412
1413 // MacipACLDelReply defines message 'macip_acl_del_reply'.
1414 type MacipACLDelReply struct {
1415         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1416 }
1417
1418 func (m *MacipACLDelReply) Reset()               { *m = MacipACLDelReply{} }
1419 func (*MacipACLDelReply) GetMessageName() string { return "macip_acl_del_reply" }
1420 func (*MacipACLDelReply) GetCrcString() string   { return "e8d4e804" }
1421 func (*MacipACLDelReply) GetMessageType() api.MessageType {
1422         return api.ReplyMessage
1423 }
1424
1425 func (m *MacipACLDelReply) Size() int {
1426         if m == nil {
1427                 return 0
1428         }
1429         var size int
1430         size += 4 // m.Retval
1431         return size
1432 }
1433 func (m *MacipACLDelReply) Marshal(b []byte) ([]byte, error) {
1434         var buf *codec.Buffer
1435         if b == nil {
1436                 buf = codec.NewBuffer(make([]byte, m.Size()))
1437         } else {
1438                 buf = codec.NewBuffer(b)
1439         }
1440         buf.EncodeUint32(uint32(m.Retval))
1441         return buf.Bytes(), nil
1442 }
1443 func (m *MacipACLDelReply) Unmarshal(b []byte) error {
1444         buf := codec.NewBuffer(b)
1445         m.Retval = int32(buf.DecodeUint32())
1446         return nil
1447 }
1448
1449 // MacipACLDetails defines message 'macip_acl_details'.
1450 type MacipACLDetails struct {
1451         ACLIndex uint32                   `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
1452         Tag      string                   `binapi:"string[64],name=tag" json:"tag,omitempty"`
1453         Count    uint32                   `binapi:"u32,name=count" json:"-"`
1454         R        []acl_types.MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
1455 }
1456
1457 func (m *MacipACLDetails) Reset()               { *m = MacipACLDetails{} }
1458 func (*MacipACLDetails) GetMessageName() string { return "macip_acl_details" }
1459 func (*MacipACLDetails) GetCrcString() string   { return "57c7482f" }
1460 func (*MacipACLDetails) GetMessageType() api.MessageType {
1461         return api.ReplyMessage
1462 }
1463
1464 func (m *MacipACLDetails) Size() int {
1465         if m == nil {
1466                 return 0
1467         }
1468         var size int
1469         size += 4  // m.ACLIndex
1470         size += 64 // m.Tag
1471         size += 4  // m.Count
1472         for j1 := 0; j1 < len(m.R); j1++ {
1473                 var s1 acl_types.MacipACLRule
1474                 _ = s1
1475                 if j1 < len(m.R) {
1476                         s1 = m.R[j1]
1477                 }
1478                 size += 1      // s1.IsPermit
1479                 size += 1 * 6  // s1.SrcMac
1480                 size += 1 * 6  // s1.SrcMacMask
1481                 size += 1      // s1.SrcPrefix.Address.Af
1482                 size += 1 * 16 // s1.SrcPrefix.Address.Un
1483                 size += 1      // s1.SrcPrefix.Len
1484         }
1485         return size
1486 }
1487 func (m *MacipACLDetails) Marshal(b []byte) ([]byte, error) {
1488         var buf *codec.Buffer
1489         if b == nil {
1490                 buf = codec.NewBuffer(make([]byte, m.Size()))
1491         } else {
1492                 buf = codec.NewBuffer(b)
1493         }
1494         buf.EncodeUint32(uint32(m.ACLIndex))
1495         buf.EncodeString(m.Tag, 64)
1496         buf.EncodeUint32(uint32(len(m.R)))
1497         for j0 := 0; j0 < len(m.R); j0++ {
1498                 var v0 acl_types.MacipACLRule
1499                 if j0 < len(m.R) {
1500                         v0 = m.R[j0]
1501                 }
1502                 buf.EncodeUint8(uint8(v0.IsPermit))
1503                 buf.EncodeBytes(v0.SrcMac[:], 6)
1504                 buf.EncodeBytes(v0.SrcMacMask[:], 6)
1505                 buf.EncodeUint8(uint8(v0.SrcPrefix.Address.Af))
1506                 buf.EncodeBytes(v0.SrcPrefix.Address.Un.XXX_UnionData[:], 0)
1507                 buf.EncodeUint8(uint8(v0.SrcPrefix.Len))
1508         }
1509         return buf.Bytes(), nil
1510 }
1511 func (m *MacipACLDetails) Unmarshal(b []byte) error {
1512         buf := codec.NewBuffer(b)
1513         m.ACLIndex = buf.DecodeUint32()
1514         m.Tag = buf.DecodeString(64)
1515         m.Count = buf.DecodeUint32()
1516         m.R = make([]acl_types.MacipACLRule, int(m.Count))
1517         for j0 := 0; j0 < len(m.R); j0++ {
1518                 m.R[j0].IsPermit = acl_types.ACLAction(buf.DecodeUint8())
1519                 copy(m.R[j0].SrcMac[:], buf.DecodeBytes(6))
1520                 copy(m.R[j0].SrcMacMask[:], buf.DecodeBytes(6))
1521                 m.R[j0].SrcPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1522                 copy(m.R[j0].SrcPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1523                 m.R[j0].SrcPrefix.Len = buf.DecodeUint8()
1524         }
1525         return nil
1526 }
1527
1528 // MacipACLDump defines message 'macip_acl_dump'.
1529 type MacipACLDump struct {
1530         ACLIndex uint32 `binapi:"u32,name=acl_index,default=%!s(float64=4.294967295e+09)" json:"acl_index,omitempty"`
1531 }
1532
1533 func (m *MacipACLDump) Reset()               { *m = MacipACLDump{} }
1534 func (*MacipACLDump) GetMessageName() string { return "macip_acl_dump" }
1535 func (*MacipACLDump) GetCrcString() string   { return "ef34fea4" }
1536 func (*MacipACLDump) GetMessageType() api.MessageType {
1537         return api.RequestMessage
1538 }
1539
1540 func (m *MacipACLDump) Size() int {
1541         if m == nil {
1542                 return 0
1543         }
1544         var size int
1545         size += 4 // m.ACLIndex
1546         return size
1547 }
1548 func (m *MacipACLDump) Marshal(b []byte) ([]byte, error) {
1549         var buf *codec.Buffer
1550         if b == nil {
1551                 buf = codec.NewBuffer(make([]byte, m.Size()))
1552         } else {
1553                 buf = codec.NewBuffer(b)
1554         }
1555         buf.EncodeUint32(uint32(m.ACLIndex))
1556         return buf.Bytes(), nil
1557 }
1558 func (m *MacipACLDump) Unmarshal(b []byte) error {
1559         buf := codec.NewBuffer(b)
1560         m.ACLIndex = buf.DecodeUint32()
1561         return nil
1562 }
1563
1564 // MacipACLInterfaceAddDel defines message 'macip_acl_interface_add_del'.
1565 type MacipACLInterfaceAddDel struct {
1566         IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1567         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1568         ACLIndex  uint32                         `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
1569 }
1570
1571 func (m *MacipACLInterfaceAddDel) Reset()               { *m = MacipACLInterfaceAddDel{} }
1572 func (*MacipACLInterfaceAddDel) GetMessageName() string { return "macip_acl_interface_add_del" }
1573 func (*MacipACLInterfaceAddDel) GetCrcString() string   { return "4b8690b1" }
1574 func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType {
1575         return api.RequestMessage
1576 }
1577
1578 func (m *MacipACLInterfaceAddDel) Size() int {
1579         if m == nil {
1580                 return 0
1581         }
1582         var size int
1583         size += 1 // m.IsAdd
1584         size += 4 // m.SwIfIndex
1585         size += 4 // m.ACLIndex
1586         return size
1587 }
1588 func (m *MacipACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
1589         var buf *codec.Buffer
1590         if b == nil {
1591                 buf = codec.NewBuffer(make([]byte, m.Size()))
1592         } else {
1593                 buf = codec.NewBuffer(b)
1594         }
1595         buf.EncodeBool(m.IsAdd)
1596         buf.EncodeUint32(uint32(m.SwIfIndex))
1597         buf.EncodeUint32(uint32(m.ACLIndex))
1598         return buf.Bytes(), nil
1599 }
1600 func (m *MacipACLInterfaceAddDel) Unmarshal(b []byte) error {
1601         buf := codec.NewBuffer(b)
1602         m.IsAdd = buf.DecodeBool()
1603         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1604         m.ACLIndex = buf.DecodeUint32()
1605         return nil
1606 }
1607
1608 // MacipACLInterfaceAddDelReply defines message 'macip_acl_interface_add_del_reply'.
1609 type MacipACLInterfaceAddDelReply struct {
1610         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1611 }
1612
1613 func (m *MacipACLInterfaceAddDelReply) Reset() { *m = MacipACLInterfaceAddDelReply{} }
1614 func (*MacipACLInterfaceAddDelReply) GetMessageName() string {
1615         return "macip_acl_interface_add_del_reply"
1616 }
1617 func (*MacipACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
1618 func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType {
1619         return api.ReplyMessage
1620 }
1621
1622 func (m *MacipACLInterfaceAddDelReply) Size() int {
1623         if m == nil {
1624                 return 0
1625         }
1626         var size int
1627         size += 4 // m.Retval
1628         return size
1629 }
1630 func (m *MacipACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
1631         var buf *codec.Buffer
1632         if b == nil {
1633                 buf = codec.NewBuffer(make([]byte, m.Size()))
1634         } else {
1635                 buf = codec.NewBuffer(b)
1636         }
1637         buf.EncodeUint32(uint32(m.Retval))
1638         return buf.Bytes(), nil
1639 }
1640 func (m *MacipACLInterfaceAddDelReply) Unmarshal(b []byte) error {
1641         buf := codec.NewBuffer(b)
1642         m.Retval = int32(buf.DecodeUint32())
1643         return nil
1644 }
1645
1646 // MacipACLInterfaceGet defines message 'macip_acl_interface_get'.
1647 type MacipACLInterfaceGet struct{}
1648
1649 func (m *MacipACLInterfaceGet) Reset()               { *m = MacipACLInterfaceGet{} }
1650 func (*MacipACLInterfaceGet) GetMessageName() string { return "macip_acl_interface_get" }
1651 func (*MacipACLInterfaceGet) GetCrcString() string   { return "51077d14" }
1652 func (*MacipACLInterfaceGet) GetMessageType() api.MessageType {
1653         return api.RequestMessage
1654 }
1655
1656 func (m *MacipACLInterfaceGet) Size() int {
1657         if m == nil {
1658                 return 0
1659         }
1660         var size int
1661         return size
1662 }
1663 func (m *MacipACLInterfaceGet) Marshal(b []byte) ([]byte, error) {
1664         var buf *codec.Buffer
1665         if b == nil {
1666                 buf = codec.NewBuffer(make([]byte, m.Size()))
1667         } else {
1668                 buf = codec.NewBuffer(b)
1669         }
1670         return buf.Bytes(), nil
1671 }
1672 func (m *MacipACLInterfaceGet) Unmarshal(b []byte) error {
1673         return nil
1674 }
1675
1676 // MacipACLInterfaceGetReply defines message 'macip_acl_interface_get_reply'.
1677 type MacipACLInterfaceGetReply struct {
1678         Count uint32   `binapi:"u32,name=count" json:"-"`
1679         Acls  []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
1680 }
1681
1682 func (m *MacipACLInterfaceGetReply) Reset()               { *m = MacipACLInterfaceGetReply{} }
1683 func (*MacipACLInterfaceGetReply) GetMessageName() string { return "macip_acl_interface_get_reply" }
1684 func (*MacipACLInterfaceGetReply) GetCrcString() string   { return "accf9b05" }
1685 func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType {
1686         return api.ReplyMessage
1687 }
1688
1689 func (m *MacipACLInterfaceGetReply) Size() int {
1690         if m == nil {
1691                 return 0
1692         }
1693         var size int
1694         size += 4               // m.Count
1695         size += 4 * len(m.Acls) // m.Acls
1696         return size
1697 }
1698 func (m *MacipACLInterfaceGetReply) Marshal(b []byte) ([]byte, error) {
1699         var buf *codec.Buffer
1700         if b == nil {
1701                 buf = codec.NewBuffer(make([]byte, m.Size()))
1702         } else {
1703                 buf = codec.NewBuffer(b)
1704         }
1705         buf.EncodeUint32(uint32(len(m.Acls)))
1706         for i := 0; i < len(m.Acls); i++ {
1707                 var x uint32
1708                 if i < len(m.Acls) {
1709                         x = uint32(m.Acls[i])
1710                 }
1711                 buf.EncodeUint32(uint32(x))
1712         }
1713         return buf.Bytes(), nil
1714 }
1715 func (m *MacipACLInterfaceGetReply) Unmarshal(b []byte) error {
1716         buf := codec.NewBuffer(b)
1717         m.Count = buf.DecodeUint32()
1718         m.Acls = make([]uint32, m.Count)
1719         for i := 0; i < len(m.Acls); i++ {
1720                 m.Acls[i] = buf.DecodeUint32()
1721         }
1722         return nil
1723 }
1724
1725 // MacipACLInterfaceListDetails defines message 'macip_acl_interface_list_details'.
1726 type MacipACLInterfaceListDetails struct {
1727         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1728         Count     uint8                          `binapi:"u8,name=count" json:"-"`
1729         Acls      []uint32                       `binapi:"u32[count],name=acls" json:"acls,omitempty"`
1730 }
1731
1732 func (m *MacipACLInterfaceListDetails) Reset() { *m = MacipACLInterfaceListDetails{} }
1733 func (*MacipACLInterfaceListDetails) GetMessageName() string {
1734         return "macip_acl_interface_list_details"
1735 }
1736 func (*MacipACLInterfaceListDetails) GetCrcString() string { return "a0c5d56d" }
1737 func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType {
1738         return api.ReplyMessage
1739 }
1740
1741 func (m *MacipACLInterfaceListDetails) Size() int {
1742         if m == nil {
1743                 return 0
1744         }
1745         var size int
1746         size += 4               // m.SwIfIndex
1747         size += 1               // m.Count
1748         size += 4 * len(m.Acls) // m.Acls
1749         return size
1750 }
1751 func (m *MacipACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
1752         var buf *codec.Buffer
1753         if b == nil {
1754                 buf = codec.NewBuffer(make([]byte, m.Size()))
1755         } else {
1756                 buf = codec.NewBuffer(b)
1757         }
1758         buf.EncodeUint32(uint32(m.SwIfIndex))
1759         buf.EncodeUint8(uint8(len(m.Acls)))
1760         for i := 0; i < len(m.Acls); i++ {
1761                 var x uint32
1762                 if i < len(m.Acls) {
1763                         x = uint32(m.Acls[i])
1764                 }
1765                 buf.EncodeUint32(uint32(x))
1766         }
1767         return buf.Bytes(), nil
1768 }
1769 func (m *MacipACLInterfaceListDetails) Unmarshal(b []byte) error {
1770         buf := codec.NewBuffer(b)
1771         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1772         m.Count = buf.DecodeUint8()
1773         m.Acls = make([]uint32, m.Count)
1774         for i := 0; i < len(m.Acls); i++ {
1775                 m.Acls[i] = buf.DecodeUint32()
1776         }
1777         return nil
1778 }
1779
1780 // MacipACLInterfaceListDump defines message 'macip_acl_interface_list_dump'.
1781 type MacipACLInterfaceListDump struct {
1782         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1783 }
1784
1785 func (m *MacipACLInterfaceListDump) Reset()               { *m = MacipACLInterfaceListDump{} }
1786 func (*MacipACLInterfaceListDump) GetMessageName() string { return "macip_acl_interface_list_dump" }
1787 func (*MacipACLInterfaceListDump) GetCrcString() string   { return "f9e6675e" }
1788 func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType {
1789         return api.RequestMessage
1790 }
1791
1792 func (m *MacipACLInterfaceListDump) Size() int {
1793         if m == nil {
1794                 return 0
1795         }
1796         var size int
1797         size += 4 // m.SwIfIndex
1798         return size
1799 }
1800 func (m *MacipACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
1801         var buf *codec.Buffer
1802         if b == nil {
1803                 buf = codec.NewBuffer(make([]byte, m.Size()))
1804         } else {
1805                 buf = codec.NewBuffer(b)
1806         }
1807         buf.EncodeUint32(uint32(m.SwIfIndex))
1808         return buf.Bytes(), nil
1809 }
1810 func (m *MacipACLInterfaceListDump) Unmarshal(b []byte) error {
1811         buf := codec.NewBuffer(b)
1812         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1813         return nil
1814 }
1815
1816 func init() { file_acl_binapi_init() }
1817 func file_acl_binapi_init() {
1818         api.RegisterMessage((*ACLAddReplace)(nil), "acl_add_replace_1cabdeab")
1819         api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl_add_replace_reply_ac407b0c")
1820         api.RegisterMessage((*ACLDel)(nil), "acl_del_ef34fea4")
1821         api.RegisterMessage((*ACLDelReply)(nil), "acl_del_reply_e8d4e804")
1822         api.RegisterMessage((*ACLDetails)(nil), "acl_details_7a97f21c")
1823         api.RegisterMessage((*ACLDump)(nil), "acl_dump_ef34fea4")
1824         api.RegisterMessage((*ACLInterfaceAddDel)(nil), "acl_interface_add_del_4b54bebd")
1825         api.RegisterMessage((*ACLInterfaceAddDelReply)(nil), "acl_interface_add_del_reply_e8d4e804")
1826         api.RegisterMessage((*ACLInterfaceEtypeWhitelistDetails)(nil), "acl_interface_etype_whitelist_details_cc2bfded")
1827         api.RegisterMessage((*ACLInterfaceEtypeWhitelistDump)(nil), "acl_interface_etype_whitelist_dump_f9e6675e")
1828         api.RegisterMessage((*ACLInterfaceListDetails)(nil), "acl_interface_list_details_e695d256")
1829         api.RegisterMessage((*ACLInterfaceListDump)(nil), "acl_interface_list_dump_f9e6675e")
1830         api.RegisterMessage((*ACLInterfaceSetACLList)(nil), "acl_interface_set_acl_list_473982bd")
1831         api.RegisterMessage((*ACLInterfaceSetACLListReply)(nil), "acl_interface_set_acl_list_reply_e8d4e804")
1832         api.RegisterMessage((*ACLInterfaceSetEtypeWhitelist)(nil), "acl_interface_set_etype_whitelist_3f5c2d2d")
1833         api.RegisterMessage((*ACLInterfaceSetEtypeWhitelistReply)(nil), "acl_interface_set_etype_whitelist_reply_e8d4e804")
1834         api.RegisterMessage((*ACLPluginControlPing)(nil), "acl_plugin_control_ping_51077d14")
1835         api.RegisterMessage((*ACLPluginControlPingReply)(nil), "acl_plugin_control_ping_reply_f6b0b8ca")
1836         api.RegisterMessage((*ACLPluginGetConnTableMaxEntries)(nil), "acl_plugin_get_conn_table_max_entries_51077d14")
1837         api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl_plugin_get_conn_table_max_entries_reply_7a096d3d")
1838         api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl_plugin_get_version_51077d14")
1839         api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl_plugin_get_version_reply_9b32cf86")
1840         api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl_stats_intf_counters_enable_b3e225d2")
1841         api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl_stats_intf_counters_enable_reply_e8d4e804")
1842         api.RegisterMessage((*MacipACLAdd)(nil), "macip_acl_add_d648fd0a")
1843         api.RegisterMessage((*MacipACLAddReplace)(nil), "macip_acl_add_replace_e34402a7")
1844         api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "macip_acl_add_replace_reply_ac407b0c")
1845         api.RegisterMessage((*MacipACLAddReply)(nil), "macip_acl_add_reply_ac407b0c")
1846         api.RegisterMessage((*MacipACLDel)(nil), "macip_acl_del_ef34fea4")
1847         api.RegisterMessage((*MacipACLDelReply)(nil), "macip_acl_del_reply_e8d4e804")
1848         api.RegisterMessage((*MacipACLDetails)(nil), "macip_acl_details_57c7482f")
1849         api.RegisterMessage((*MacipACLDump)(nil), "macip_acl_dump_ef34fea4")
1850         api.RegisterMessage((*MacipACLInterfaceAddDel)(nil), "macip_acl_interface_add_del_4b8690b1")
1851         api.RegisterMessage((*MacipACLInterfaceAddDelReply)(nil), "macip_acl_interface_add_del_reply_e8d4e804")
1852         api.RegisterMessage((*MacipACLInterfaceGet)(nil), "macip_acl_interface_get_51077d14")
1853         api.RegisterMessage((*MacipACLInterfaceGetReply)(nil), "macip_acl_interface_get_reply_accf9b05")
1854         api.RegisterMessage((*MacipACLInterfaceListDetails)(nil), "macip_acl_interface_list_details_a0c5d56d")
1855         api.RegisterMessage((*MacipACLInterfaceListDump)(nil), "macip_acl_interface_list_dump_f9e6675e")
1856 }
1857
1858 // Messages returns list of all messages in this module.
1859 func AllMessages() []api.Message {
1860         return []api.Message{
1861                 (*ACLAddReplace)(nil),
1862                 (*ACLAddReplaceReply)(nil),
1863                 (*ACLDel)(nil),
1864                 (*ACLDelReply)(nil),
1865                 (*ACLDetails)(nil),
1866                 (*ACLDump)(nil),
1867                 (*ACLInterfaceAddDel)(nil),
1868                 (*ACLInterfaceAddDelReply)(nil),
1869                 (*ACLInterfaceEtypeWhitelistDetails)(nil),
1870                 (*ACLInterfaceEtypeWhitelistDump)(nil),
1871                 (*ACLInterfaceListDetails)(nil),
1872                 (*ACLInterfaceListDump)(nil),
1873                 (*ACLInterfaceSetACLList)(nil),
1874                 (*ACLInterfaceSetACLListReply)(nil),
1875                 (*ACLInterfaceSetEtypeWhitelist)(nil),
1876                 (*ACLInterfaceSetEtypeWhitelistReply)(nil),
1877                 (*ACLPluginControlPing)(nil),
1878                 (*ACLPluginControlPingReply)(nil),
1879                 (*ACLPluginGetConnTableMaxEntries)(nil),
1880                 (*ACLPluginGetConnTableMaxEntriesReply)(nil),
1881                 (*ACLPluginGetVersion)(nil),
1882                 (*ACLPluginGetVersionReply)(nil),
1883                 (*ACLStatsIntfCountersEnable)(nil),
1884                 (*ACLStatsIntfCountersEnableReply)(nil),
1885                 (*MacipACLAdd)(nil),
1886                 (*MacipACLAddReplace)(nil),
1887                 (*MacipACLAddReplaceReply)(nil),
1888                 (*MacipACLAddReply)(nil),
1889                 (*MacipACLDel)(nil),
1890                 (*MacipACLDelReply)(nil),
1891                 (*MacipACLDetails)(nil),
1892                 (*MacipACLDump)(nil),
1893                 (*MacipACLInterfaceAddDel)(nil),
1894                 (*MacipACLInterfaceAddDelReply)(nil),
1895                 (*MacipACLInterfaceGet)(nil),
1896                 (*MacipACLInterfaceGetReply)(nil),
1897                 (*MacipACLInterfaceListDetails)(nil),
1898                 (*MacipACLInterfaceListDump)(nil),
1899         }
1900 }