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