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