Refactored binapi generator with message encoding
[govpp.git] / examples / binapi / acl / acl.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-alpha-1-g435c3f4-dirty
4 //  VPP:              20.01-45~g7a071e370~b63
5 // source: /usr/share/vpp/api/plugins/acl.api.json
6
7 /*
8 Package acl contains generated code for VPP binary API defined by acl.api (version 1.0.1).
9
10 It consists of:
11          38 messages
12           2 types
13 */
14 package acl
15
16 import (
17         "bytes"
18         "context"
19         "encoding/binary"
20         "io"
21         "math"
22         "strconv"
23
24         api "git.fd.io/govpp.git/api"
25         codec "git.fd.io/govpp.git/codec"
26         struc "github.com/lunixbochs/struc"
27 )
28
29 // This is a compile-time assertion to ensure that this generated file
30 // is compatible with the GoVPP api package it is being compiled against.
31 // A compilation error at this line likely means your copy of the
32 // GoVPP api package needs to be updated.
33 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
34
35 const (
36         // ModuleName is the name of this module.
37         ModuleName = "acl"
38         // APIVersion is the API version of this module.
39         APIVersion = "1.0.1"
40         // VersionCrc is the CRC of this module.
41         VersionCrc = 0x11c5c1e5
42 )
43
44 // ACLRule represents VPP binary API type 'acl_rule'.
45 type ACLRule struct {
46         IsPermit               uint8  `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
47         IsIPv6                 uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
48         SrcIPAddr              []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty" struc:"[16]byte"`
49         SrcIPPrefixLen         uint8  `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
50         DstIPAddr              []byte `binapi:"u8[16],name=dst_ip_addr" json:"dst_ip_addr,omitempty" struc:"[16]byte"`
51         DstIPPrefixLen         uint8  `binapi:"u8,name=dst_ip_prefix_len" json:"dst_ip_prefix_len,omitempty"`
52         Proto                  uint8  `binapi:"u8,name=proto" json:"proto,omitempty"`
53         SrcportOrIcmptypeFirst uint16 `binapi:"u16,name=srcport_or_icmptype_first" json:"srcport_or_icmptype_first,omitempty"`
54         SrcportOrIcmptypeLast  uint16 `binapi:"u16,name=srcport_or_icmptype_last" json:"srcport_or_icmptype_last,omitempty"`
55         DstportOrIcmpcodeFirst uint16 `binapi:"u16,name=dstport_or_icmpcode_first" json:"dstport_or_icmpcode_first,omitempty"`
56         DstportOrIcmpcodeLast  uint16 `binapi:"u16,name=dstport_or_icmpcode_last" json:"dstport_or_icmpcode_last,omitempty"`
57         TCPFlagsMask           uint8  `binapi:"u8,name=tcp_flags_mask" json:"tcp_flags_mask,omitempty"`
58         TCPFlagsValue          uint8  `binapi:"u8,name=tcp_flags_value" json:"tcp_flags_value,omitempty"`
59 }
60
61 func (*ACLRule) GetTypeName() string { return "acl_rule" }
62
63 // MacipACLRule represents VPP binary API type 'macip_acl_rule'.
64 type MacipACLRule struct {
65         IsPermit       uint8  `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
66         IsIPv6         uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
67         SrcMac         []byte `binapi:"u8[6],name=src_mac" json:"src_mac,omitempty" struc:"[6]byte"`
68         SrcMacMask     []byte `binapi:"u8[6],name=src_mac_mask" json:"src_mac_mask,omitempty" struc:"[6]byte"`
69         SrcIPAddr      []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty" struc:"[16]byte"`
70         SrcIPPrefixLen uint8  `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
71 }
72
73 func (*MacipACLRule) GetTypeName() string { return "macip_acl_rule" }
74
75 // ACLAddReplace represents VPP binary API message 'acl_add_replace'.
76 type ACLAddReplace struct {
77         ACLIndex uint32    `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
78         Tag      []byte    `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
79         Count    uint32    `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
80         R        []ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
81 }
82
83 func (m *ACLAddReplace) Reset()                        { *m = ACLAddReplace{} }
84 func (*ACLAddReplace) GetMessageName() string          { return "acl_add_replace" }
85 func (*ACLAddReplace) GetCrcString() string            { return "13bc8539" }
86 func (*ACLAddReplace) GetMessageType() api.MessageType { return api.RequestMessage }
87
88 func (m *ACLAddReplace) Size() int {
89         if m == nil {
90                 return 0
91         }
92         var size int
93         // field[1] m.ACLIndex
94         size += 4
95         // field[1] m.Tag
96         size += 64
97         // field[1] m.Count
98         size += 4
99         // field[1] m.R
100         for j1 := 0; j1 < len(m.R); j1++ {
101                 var s1 ACLRule
102                 _ = s1
103                 if j1 < len(m.R) {
104                         s1 = m.R[j1]
105                 }
106                 // field[2] s1.IsPermit
107                 size += 1
108                 // field[2] s1.IsIPv6
109                 size += 1
110                 // field[2] s1.SrcIPAddr
111                 size += 16
112                 // field[2] s1.SrcIPPrefixLen
113                 size += 1
114                 // field[2] s1.DstIPAddr
115                 size += 16
116                 // field[2] s1.DstIPPrefixLen
117                 size += 1
118                 // field[2] s1.Proto
119                 size += 1
120                 // field[2] s1.SrcportOrIcmptypeFirst
121                 size += 2
122                 // field[2] s1.SrcportOrIcmptypeLast
123                 size += 2
124                 // field[2] s1.DstportOrIcmpcodeFirst
125                 size += 2
126                 // field[2] s1.DstportOrIcmpcodeLast
127                 size += 2
128                 // field[2] s1.TCPFlagsMask
129                 size += 1
130                 // field[2] s1.TCPFlagsValue
131                 size += 1
132         }
133         return size
134 }
135 func (m *ACLAddReplace) Marshal(b []byte) ([]byte, error) {
136         o := binary.BigEndian
137         _ = o
138         pos := 0
139         _ = pos
140         var buf []byte
141         if b == nil {
142                 buf = make([]byte, m.Size())
143         } else {
144                 buf = b
145         }
146         // field[1] m.ACLIndex
147         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
148         pos += 4
149         // field[1] m.Tag
150         for i := 0; i < 64; i++ {
151                 var x uint8
152                 if i < len(m.Tag) {
153                         x = uint8(m.Tag[i])
154                 }
155                 buf[pos] = uint8(x)
156                 pos += 1
157         }
158         // field[1] m.Count
159         o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
160         pos += 4
161         // field[1] m.R
162         for j1 := 0; j1 < len(m.R); j1++ {
163                 var v1 ACLRule
164                 if j1 < len(m.R) {
165                         v1 = m.R[j1]
166                 }
167                 // field[2] v1.IsPermit
168                 buf[pos] = uint8(v1.IsPermit)
169                 pos += 1
170                 // field[2] v1.IsIPv6
171                 buf[pos] = uint8(v1.IsIPv6)
172                 pos += 1
173                 // field[2] v1.SrcIPAddr
174                 for i := 0; i < 16; i++ {
175                         var x uint8
176                         if i < len(v1.SrcIPAddr) {
177                                 x = uint8(v1.SrcIPAddr[i])
178                         }
179                         buf[pos] = uint8(x)
180                         pos += 1
181                 }
182                 // field[2] v1.SrcIPPrefixLen
183                 buf[pos] = uint8(v1.SrcIPPrefixLen)
184                 pos += 1
185                 // field[2] v1.DstIPAddr
186                 for i := 0; i < 16; i++ {
187                         var x uint8
188                         if i < len(v1.DstIPAddr) {
189                                 x = uint8(v1.DstIPAddr[i])
190                         }
191                         buf[pos] = uint8(x)
192                         pos += 1
193                 }
194                 // field[2] v1.DstIPPrefixLen
195                 buf[pos] = uint8(v1.DstIPPrefixLen)
196                 pos += 1
197                 // field[2] v1.Proto
198                 buf[pos] = uint8(v1.Proto)
199                 pos += 1
200                 // field[2] v1.SrcportOrIcmptypeFirst
201                 o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeFirst))
202                 pos += 2
203                 // field[2] v1.SrcportOrIcmptypeLast
204                 o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeLast))
205                 pos += 2
206                 // field[2] v1.DstportOrIcmpcodeFirst
207                 o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeFirst))
208                 pos += 2
209                 // field[2] v1.DstportOrIcmpcodeLast
210                 o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeLast))
211                 pos += 2
212                 // field[2] v1.TCPFlagsMask
213                 buf[pos] = uint8(v1.TCPFlagsMask)
214                 pos += 1
215                 // field[2] v1.TCPFlagsValue
216                 buf[pos] = uint8(v1.TCPFlagsValue)
217                 pos += 1
218         }
219         return buf, nil
220 }
221 func (m *ACLAddReplace) Unmarshal(tmp []byte) error {
222         o := binary.BigEndian
223         _ = o
224         pos := 0
225         _ = pos
226         // field[1] m.ACLIndex
227         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
228         pos += 4
229         // field[1] m.Tag
230         m.Tag = make([]uint8, 64)
231         for i := 0; i < len(m.Tag); i++ {
232                 m.Tag[i] = uint8(tmp[pos])
233                 pos += 1
234         }
235         // field[1] m.Count
236         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
237         pos += 4
238         // field[1] m.R
239         m.R = make([]ACLRule, int(m.Count))
240         for j1 := 0; j1 < int(m.Count); j1++ {
241                 // field[2] m.R[j1].IsPermit
242                 m.R[j1].IsPermit = uint8(tmp[pos])
243                 pos += 1
244                 // field[2] m.R[j1].IsIPv6
245                 m.R[j1].IsIPv6 = uint8(tmp[pos])
246                 pos += 1
247                 // field[2] m.R[j1].SrcIPAddr
248                 m.R[j1].SrcIPAddr = make([]uint8, 16)
249                 for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
250                         m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
251                         pos += 1
252                 }
253                 // field[2] m.R[j1].SrcIPPrefixLen
254                 m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
255                 pos += 1
256                 // field[2] m.R[j1].DstIPAddr
257                 m.R[j1].DstIPAddr = make([]uint8, 16)
258                 for i := 0; i < len(m.R[j1].DstIPAddr); i++ {
259                         m.R[j1].DstIPAddr[i] = uint8(tmp[pos])
260                         pos += 1
261                 }
262                 // field[2] m.R[j1].DstIPPrefixLen
263                 m.R[j1].DstIPPrefixLen = uint8(tmp[pos])
264                 pos += 1
265                 // field[2] m.R[j1].Proto
266                 m.R[j1].Proto = uint8(tmp[pos])
267                 pos += 1
268                 // field[2] m.R[j1].SrcportOrIcmptypeFirst
269                 m.R[j1].SrcportOrIcmptypeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
270                 pos += 2
271                 // field[2] m.R[j1].SrcportOrIcmptypeLast
272                 m.R[j1].SrcportOrIcmptypeLast = uint16(o.Uint16(tmp[pos : pos+2]))
273                 pos += 2
274                 // field[2] m.R[j1].DstportOrIcmpcodeFirst
275                 m.R[j1].DstportOrIcmpcodeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
276                 pos += 2
277                 // field[2] m.R[j1].DstportOrIcmpcodeLast
278                 m.R[j1].DstportOrIcmpcodeLast = uint16(o.Uint16(tmp[pos : pos+2]))
279                 pos += 2
280                 // field[2] m.R[j1].TCPFlagsMask
281                 m.R[j1].TCPFlagsMask = uint8(tmp[pos])
282                 pos += 1
283                 // field[2] m.R[j1].TCPFlagsValue
284                 m.R[j1].TCPFlagsValue = uint8(tmp[pos])
285                 pos += 1
286         }
287         return nil
288 }
289
290 // ACLAddReplaceReply represents VPP binary API message 'acl_add_replace_reply'.
291 type ACLAddReplaceReply struct {
292         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
293         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
294 }
295
296 func (m *ACLAddReplaceReply) Reset()                        { *m = ACLAddReplaceReply{} }
297 func (*ACLAddReplaceReply) GetMessageName() string          { return "acl_add_replace_reply" }
298 func (*ACLAddReplaceReply) GetCrcString() string            { return "ac407b0c" }
299 func (*ACLAddReplaceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
300
301 func (m *ACLAddReplaceReply) Size() int {
302         if m == nil {
303                 return 0
304         }
305         var size int
306         // field[1] m.ACLIndex
307         size += 4
308         // field[1] m.Retval
309         size += 4
310         return size
311 }
312 func (m *ACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
313         o := binary.BigEndian
314         _ = o
315         pos := 0
316         _ = pos
317         var buf []byte
318         if b == nil {
319                 buf = make([]byte, m.Size())
320         } else {
321                 buf = b
322         }
323         // field[1] m.ACLIndex
324         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
325         pos += 4
326         // field[1] m.Retval
327         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
328         pos += 4
329         return buf, nil
330 }
331 func (m *ACLAddReplaceReply) Unmarshal(tmp []byte) error {
332         o := binary.BigEndian
333         _ = o
334         pos := 0
335         _ = pos
336         // field[1] m.ACLIndex
337         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
338         pos += 4
339         // field[1] m.Retval
340         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
341         pos += 4
342         return nil
343 }
344
345 // ACLDel represents VPP binary API message 'acl_del'.
346 type ACLDel struct {
347         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
348 }
349
350 func (m *ACLDel) Reset()                        { *m = ACLDel{} }
351 func (*ACLDel) GetMessageName() string          { return "acl_del" }
352 func (*ACLDel) GetCrcString() string            { return "ef34fea4" }
353 func (*ACLDel) GetMessageType() api.MessageType { return api.RequestMessage }
354
355 func (m *ACLDel) Size() int {
356         if m == nil {
357                 return 0
358         }
359         var size int
360         // field[1] m.ACLIndex
361         size += 4
362         return size
363 }
364 func (m *ACLDel) Marshal(b []byte) ([]byte, error) {
365         o := binary.BigEndian
366         _ = o
367         pos := 0
368         _ = pos
369         var buf []byte
370         if b == nil {
371                 buf = make([]byte, m.Size())
372         } else {
373                 buf = b
374         }
375         // field[1] m.ACLIndex
376         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
377         pos += 4
378         return buf, nil
379 }
380 func (m *ACLDel) Unmarshal(tmp []byte) error {
381         o := binary.BigEndian
382         _ = o
383         pos := 0
384         _ = pos
385         // field[1] m.ACLIndex
386         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
387         pos += 4
388         return nil
389 }
390
391 // ACLDelReply represents VPP binary API message 'acl_del_reply'.
392 type ACLDelReply struct {
393         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
394 }
395
396 func (m *ACLDelReply) Reset()                        { *m = ACLDelReply{} }
397 func (*ACLDelReply) GetMessageName() string          { return "acl_del_reply" }
398 func (*ACLDelReply) GetCrcString() string            { return "e8d4e804" }
399 func (*ACLDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
400
401 func (m *ACLDelReply) Size() int {
402         if m == nil {
403                 return 0
404         }
405         var size int
406         // field[1] m.Retval
407         size += 4
408         return size
409 }
410 func (m *ACLDelReply) Marshal(b []byte) ([]byte, error) {
411         o := binary.BigEndian
412         _ = o
413         pos := 0
414         _ = pos
415         var buf []byte
416         if b == nil {
417                 buf = make([]byte, m.Size())
418         } else {
419                 buf = b
420         }
421         // field[1] m.Retval
422         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
423         pos += 4
424         return buf, nil
425 }
426 func (m *ACLDelReply) Unmarshal(tmp []byte) error {
427         o := binary.BigEndian
428         _ = o
429         pos := 0
430         _ = pos
431         // field[1] m.Retval
432         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
433         pos += 4
434         return nil
435 }
436
437 // ACLDetails represents VPP binary API message 'acl_details'.
438 type ACLDetails struct {
439         ACLIndex uint32    `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
440         Tag      []byte    `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
441         Count    uint32    `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
442         R        []ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
443 }
444
445 func (m *ACLDetails) Reset()                        { *m = ACLDetails{} }
446 func (*ACLDetails) GetMessageName() string          { return "acl_details" }
447 func (*ACLDetails) GetCrcString() string            { return "f89d7a88" }
448 func (*ACLDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
449
450 func (m *ACLDetails) Size() int {
451         if m == nil {
452                 return 0
453         }
454         var size int
455         // field[1] m.ACLIndex
456         size += 4
457         // field[1] m.Tag
458         size += 64
459         // field[1] m.Count
460         size += 4
461         // field[1] m.R
462         for j1 := 0; j1 < len(m.R); j1++ {
463                 var s1 ACLRule
464                 _ = s1
465                 if j1 < len(m.R) {
466                         s1 = m.R[j1]
467                 }
468                 // field[2] s1.IsPermit
469                 size += 1
470                 // field[2] s1.IsIPv6
471                 size += 1
472                 // field[2] s1.SrcIPAddr
473                 size += 16
474                 // field[2] s1.SrcIPPrefixLen
475                 size += 1
476                 // field[2] s1.DstIPAddr
477                 size += 16
478                 // field[2] s1.DstIPPrefixLen
479                 size += 1
480                 // field[2] s1.Proto
481                 size += 1
482                 // field[2] s1.SrcportOrIcmptypeFirst
483                 size += 2
484                 // field[2] s1.SrcportOrIcmptypeLast
485                 size += 2
486                 // field[2] s1.DstportOrIcmpcodeFirst
487                 size += 2
488                 // field[2] s1.DstportOrIcmpcodeLast
489                 size += 2
490                 // field[2] s1.TCPFlagsMask
491                 size += 1
492                 // field[2] s1.TCPFlagsValue
493                 size += 1
494         }
495         return size
496 }
497 func (m *ACLDetails) Marshal(b []byte) ([]byte, error) {
498         o := binary.BigEndian
499         _ = o
500         pos := 0
501         _ = pos
502         var buf []byte
503         if b == nil {
504                 buf = make([]byte, m.Size())
505         } else {
506                 buf = b
507         }
508         // field[1] m.ACLIndex
509         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
510         pos += 4
511         // field[1] m.Tag
512         for i := 0; i < 64; i++ {
513                 var x uint8
514                 if i < len(m.Tag) {
515                         x = uint8(m.Tag[i])
516                 }
517                 buf[pos] = uint8(x)
518                 pos += 1
519         }
520         // field[1] m.Count
521         o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
522         pos += 4
523         // field[1] m.R
524         for j1 := 0; j1 < len(m.R); j1++ {
525                 var v1 ACLRule
526                 if j1 < len(m.R) {
527                         v1 = m.R[j1]
528                 }
529                 // field[2] v1.IsPermit
530                 buf[pos] = uint8(v1.IsPermit)
531                 pos += 1
532                 // field[2] v1.IsIPv6
533                 buf[pos] = uint8(v1.IsIPv6)
534                 pos += 1
535                 // field[2] v1.SrcIPAddr
536                 for i := 0; i < 16; i++ {
537                         var x uint8
538                         if i < len(v1.SrcIPAddr) {
539                                 x = uint8(v1.SrcIPAddr[i])
540                         }
541                         buf[pos] = uint8(x)
542                         pos += 1
543                 }
544                 // field[2] v1.SrcIPPrefixLen
545                 buf[pos] = uint8(v1.SrcIPPrefixLen)
546                 pos += 1
547                 // field[2] v1.DstIPAddr
548                 for i := 0; i < 16; i++ {
549                         var x uint8
550                         if i < len(v1.DstIPAddr) {
551                                 x = uint8(v1.DstIPAddr[i])
552                         }
553                         buf[pos] = uint8(x)
554                         pos += 1
555                 }
556                 // field[2] v1.DstIPPrefixLen
557                 buf[pos] = uint8(v1.DstIPPrefixLen)
558                 pos += 1
559                 // field[2] v1.Proto
560                 buf[pos] = uint8(v1.Proto)
561                 pos += 1
562                 // field[2] v1.SrcportOrIcmptypeFirst
563                 o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeFirst))
564                 pos += 2
565                 // field[2] v1.SrcportOrIcmptypeLast
566                 o.PutUint16(buf[pos:pos+2], uint16(v1.SrcportOrIcmptypeLast))
567                 pos += 2
568                 // field[2] v1.DstportOrIcmpcodeFirst
569                 o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeFirst))
570                 pos += 2
571                 // field[2] v1.DstportOrIcmpcodeLast
572                 o.PutUint16(buf[pos:pos+2], uint16(v1.DstportOrIcmpcodeLast))
573                 pos += 2
574                 // field[2] v1.TCPFlagsMask
575                 buf[pos] = uint8(v1.TCPFlagsMask)
576                 pos += 1
577                 // field[2] v1.TCPFlagsValue
578                 buf[pos] = uint8(v1.TCPFlagsValue)
579                 pos += 1
580         }
581         return buf, nil
582 }
583 func (m *ACLDetails) Unmarshal(tmp []byte) error {
584         o := binary.BigEndian
585         _ = o
586         pos := 0
587         _ = pos
588         // field[1] m.ACLIndex
589         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
590         pos += 4
591         // field[1] m.Tag
592         m.Tag = make([]uint8, 64)
593         for i := 0; i < len(m.Tag); i++ {
594                 m.Tag[i] = uint8(tmp[pos])
595                 pos += 1
596         }
597         // field[1] m.Count
598         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
599         pos += 4
600         // field[1] m.R
601         m.R = make([]ACLRule, int(m.Count))
602         for j1 := 0; j1 < int(m.Count); j1++ {
603                 // field[2] m.R[j1].IsPermit
604                 m.R[j1].IsPermit = uint8(tmp[pos])
605                 pos += 1
606                 // field[2] m.R[j1].IsIPv6
607                 m.R[j1].IsIPv6 = uint8(tmp[pos])
608                 pos += 1
609                 // field[2] m.R[j1].SrcIPAddr
610                 m.R[j1].SrcIPAddr = make([]uint8, 16)
611                 for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
612                         m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
613                         pos += 1
614                 }
615                 // field[2] m.R[j1].SrcIPPrefixLen
616                 m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
617                 pos += 1
618                 // field[2] m.R[j1].DstIPAddr
619                 m.R[j1].DstIPAddr = make([]uint8, 16)
620                 for i := 0; i < len(m.R[j1].DstIPAddr); i++ {
621                         m.R[j1].DstIPAddr[i] = uint8(tmp[pos])
622                         pos += 1
623                 }
624                 // field[2] m.R[j1].DstIPPrefixLen
625                 m.R[j1].DstIPPrefixLen = uint8(tmp[pos])
626                 pos += 1
627                 // field[2] m.R[j1].Proto
628                 m.R[j1].Proto = uint8(tmp[pos])
629                 pos += 1
630                 // field[2] m.R[j1].SrcportOrIcmptypeFirst
631                 m.R[j1].SrcportOrIcmptypeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
632                 pos += 2
633                 // field[2] m.R[j1].SrcportOrIcmptypeLast
634                 m.R[j1].SrcportOrIcmptypeLast = uint16(o.Uint16(tmp[pos : pos+2]))
635                 pos += 2
636                 // field[2] m.R[j1].DstportOrIcmpcodeFirst
637                 m.R[j1].DstportOrIcmpcodeFirst = uint16(o.Uint16(tmp[pos : pos+2]))
638                 pos += 2
639                 // field[2] m.R[j1].DstportOrIcmpcodeLast
640                 m.R[j1].DstportOrIcmpcodeLast = uint16(o.Uint16(tmp[pos : pos+2]))
641                 pos += 2
642                 // field[2] m.R[j1].TCPFlagsMask
643                 m.R[j1].TCPFlagsMask = uint8(tmp[pos])
644                 pos += 1
645                 // field[2] m.R[j1].TCPFlagsValue
646                 m.R[j1].TCPFlagsValue = uint8(tmp[pos])
647                 pos += 1
648         }
649         return nil
650 }
651
652 // ACLDump represents VPP binary API message 'acl_dump'.
653 type ACLDump struct {
654         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
655 }
656
657 func (m *ACLDump) Reset()                        { *m = ACLDump{} }
658 func (*ACLDump) GetMessageName() string          { return "acl_dump" }
659 func (*ACLDump) GetCrcString() string            { return "ef34fea4" }
660 func (*ACLDump) GetMessageType() api.MessageType { return api.RequestMessage }
661
662 func (m *ACLDump) Size() int {
663         if m == nil {
664                 return 0
665         }
666         var size int
667         // field[1] m.ACLIndex
668         size += 4
669         return size
670 }
671 func (m *ACLDump) Marshal(b []byte) ([]byte, error) {
672         o := binary.BigEndian
673         _ = o
674         pos := 0
675         _ = pos
676         var buf []byte
677         if b == nil {
678                 buf = make([]byte, m.Size())
679         } else {
680                 buf = b
681         }
682         // field[1] m.ACLIndex
683         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
684         pos += 4
685         return buf, nil
686 }
687 func (m *ACLDump) Unmarshal(tmp []byte) error {
688         o := binary.BigEndian
689         _ = o
690         pos := 0
691         _ = pos
692         // field[1] m.ACLIndex
693         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
694         pos += 4
695         return nil
696 }
697
698 // ACLInterfaceAddDel represents VPP binary API message 'acl_interface_add_del'.
699 type ACLInterfaceAddDel struct {
700         IsAdd     uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
701         IsInput   uint8  `binapi:"u8,name=is_input" json:"is_input,omitempty"`
702         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
703         ACLIndex  uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
704 }
705
706 func (m *ACLInterfaceAddDel) Reset()                        { *m = ACLInterfaceAddDel{} }
707 func (*ACLInterfaceAddDel) GetMessageName() string          { return "acl_interface_add_del" }
708 func (*ACLInterfaceAddDel) GetCrcString() string            { return "0b2aedd1" }
709 func (*ACLInterfaceAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
710
711 func (m *ACLInterfaceAddDel) Size() int {
712         if m == nil {
713                 return 0
714         }
715         var size int
716         // field[1] m.IsAdd
717         size += 1
718         // field[1] m.IsInput
719         size += 1
720         // field[1] m.SwIfIndex
721         size += 4
722         // field[1] m.ACLIndex
723         size += 4
724         return size
725 }
726 func (m *ACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
727         o := binary.BigEndian
728         _ = o
729         pos := 0
730         _ = pos
731         var buf []byte
732         if b == nil {
733                 buf = make([]byte, m.Size())
734         } else {
735                 buf = b
736         }
737         // field[1] m.IsAdd
738         buf[pos] = uint8(m.IsAdd)
739         pos += 1
740         // field[1] m.IsInput
741         buf[pos] = uint8(m.IsInput)
742         pos += 1
743         // field[1] m.SwIfIndex
744         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
745         pos += 4
746         // field[1] m.ACLIndex
747         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
748         pos += 4
749         return buf, nil
750 }
751 func (m *ACLInterfaceAddDel) Unmarshal(tmp []byte) error {
752         o := binary.BigEndian
753         _ = o
754         pos := 0
755         _ = pos
756         // field[1] m.IsAdd
757         m.IsAdd = uint8(tmp[pos])
758         pos += 1
759         // field[1] m.IsInput
760         m.IsInput = uint8(tmp[pos])
761         pos += 1
762         // field[1] m.SwIfIndex
763         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
764         pos += 4
765         // field[1] m.ACLIndex
766         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
767         pos += 4
768         return nil
769 }
770
771 // ACLInterfaceAddDelReply represents VPP binary API message 'acl_interface_add_del_reply'.
772 type ACLInterfaceAddDelReply struct {
773         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
774 }
775
776 func (m *ACLInterfaceAddDelReply) Reset()                        { *m = ACLInterfaceAddDelReply{} }
777 func (*ACLInterfaceAddDelReply) GetMessageName() string          { return "acl_interface_add_del_reply" }
778 func (*ACLInterfaceAddDelReply) GetCrcString() string            { return "e8d4e804" }
779 func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
780
781 func (m *ACLInterfaceAddDelReply) Size() int {
782         if m == nil {
783                 return 0
784         }
785         var size int
786         // field[1] m.Retval
787         size += 4
788         return size
789 }
790 func (m *ACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
791         o := binary.BigEndian
792         _ = o
793         pos := 0
794         _ = pos
795         var buf []byte
796         if b == nil {
797                 buf = make([]byte, m.Size())
798         } else {
799                 buf = b
800         }
801         // field[1] m.Retval
802         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
803         pos += 4
804         return buf, nil
805 }
806 func (m *ACLInterfaceAddDelReply) Unmarshal(tmp []byte) error {
807         o := binary.BigEndian
808         _ = o
809         pos := 0
810         _ = pos
811         // field[1] m.Retval
812         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
813         pos += 4
814         return nil
815 }
816
817 // ACLInterfaceEtypeWhitelistDetails represents VPP binary API message 'acl_interface_etype_whitelist_details'.
818 type ACLInterfaceEtypeWhitelistDetails struct {
819         SwIfIndex uint32   `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
820         Count     uint8    `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Whitelist"`
821         NInput    uint8    `binapi:"u8,name=n_input" json:"n_input,omitempty"`
822         Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
823 }
824
825 func (m *ACLInterfaceEtypeWhitelistDetails) Reset() { *m = ACLInterfaceEtypeWhitelistDetails{} }
826 func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string {
827         return "acl_interface_etype_whitelist_details"
828 }
829 func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string            { return "6a5d4e81" }
830 func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
831
832 func (m *ACLInterfaceEtypeWhitelistDetails) Size() int {
833         if m == nil {
834                 return 0
835         }
836         var size int
837         // field[1] m.SwIfIndex
838         size += 4
839         // field[1] m.Count
840         size += 1
841         // field[1] m.NInput
842         size += 1
843         // field[1] m.Whitelist
844         size += 2 * len(m.Whitelist)
845         return size
846 }
847 func (m *ACLInterfaceEtypeWhitelistDetails) Marshal(b []byte) ([]byte, error) {
848         o := binary.BigEndian
849         _ = o
850         pos := 0
851         _ = pos
852         var buf []byte
853         if b == nil {
854                 buf = make([]byte, m.Size())
855         } else {
856                 buf = b
857         }
858         // field[1] m.SwIfIndex
859         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
860         pos += 4
861         // field[1] m.Count
862         buf[pos] = uint8(len(m.Whitelist))
863         pos += 1
864         // field[1] m.NInput
865         buf[pos] = uint8(m.NInput)
866         pos += 1
867         // field[1] m.Whitelist
868         for i := 0; i < len(m.Whitelist); i++ {
869                 var x uint16
870                 if i < len(m.Whitelist) {
871                         x = uint16(m.Whitelist[i])
872                 }
873                 o.PutUint16(buf[pos:pos+2], uint16(x))
874                 pos += 2
875         }
876         return buf, nil
877 }
878 func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(tmp []byte) error {
879         o := binary.BigEndian
880         _ = o
881         pos := 0
882         _ = pos
883         // field[1] m.SwIfIndex
884         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
885         pos += 4
886         // field[1] m.Count
887         m.Count = uint8(tmp[pos])
888         pos += 1
889         // field[1] m.NInput
890         m.NInput = uint8(tmp[pos])
891         pos += 1
892         // field[1] m.Whitelist
893         m.Whitelist = make([]uint16, m.Count)
894         for i := 0; i < len(m.Whitelist); i++ {
895                 m.Whitelist[i] = uint16(o.Uint16(tmp[pos : pos+2]))
896                 pos += 2
897         }
898         return nil
899 }
900
901 // ACLInterfaceEtypeWhitelistDump represents VPP binary API message 'acl_interface_etype_whitelist_dump'.
902 type ACLInterfaceEtypeWhitelistDump struct {
903         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
904 }
905
906 func (m *ACLInterfaceEtypeWhitelistDump) Reset() { *m = ACLInterfaceEtypeWhitelistDump{} }
907 func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string {
908         return "acl_interface_etype_whitelist_dump"
909 }
910 func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string            { return "529cb13f" }
911 func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType { return api.RequestMessage }
912
913 func (m *ACLInterfaceEtypeWhitelistDump) Size() int {
914         if m == nil {
915                 return 0
916         }
917         var size int
918         // field[1] m.SwIfIndex
919         size += 4
920         return size
921 }
922 func (m *ACLInterfaceEtypeWhitelistDump) Marshal(b []byte) ([]byte, error) {
923         o := binary.BigEndian
924         _ = o
925         pos := 0
926         _ = pos
927         var buf []byte
928         if b == nil {
929                 buf = make([]byte, m.Size())
930         } else {
931                 buf = b
932         }
933         // field[1] m.SwIfIndex
934         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
935         pos += 4
936         return buf, nil
937 }
938 func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(tmp []byte) error {
939         o := binary.BigEndian
940         _ = o
941         pos := 0
942         _ = pos
943         // field[1] m.SwIfIndex
944         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
945         pos += 4
946         return nil
947 }
948
949 // ACLInterfaceListDetails represents VPP binary API message 'acl_interface_list_details'.
950 type ACLInterfaceListDetails struct {
951         SwIfIndex uint32   `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
952         Count     uint8    `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
953         NInput    uint8    `binapi:"u8,name=n_input" json:"n_input,omitempty"`
954         Acls      []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
955 }
956
957 func (m *ACLInterfaceListDetails) Reset()                        { *m = ACLInterfaceListDetails{} }
958 func (*ACLInterfaceListDetails) GetMessageName() string          { return "acl_interface_list_details" }
959 func (*ACLInterfaceListDetails) GetCrcString() string            { return "d5e80809" }
960 func (*ACLInterfaceListDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
961
962 func (m *ACLInterfaceListDetails) Size() int {
963         if m == nil {
964                 return 0
965         }
966         var size int
967         // field[1] m.SwIfIndex
968         size += 4
969         // field[1] m.Count
970         size += 1
971         // field[1] m.NInput
972         size += 1
973         // field[1] m.Acls
974         size += 4 * len(m.Acls)
975         return size
976 }
977 func (m *ACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
978         o := binary.BigEndian
979         _ = o
980         pos := 0
981         _ = pos
982         var buf []byte
983         if b == nil {
984                 buf = make([]byte, m.Size())
985         } else {
986                 buf = b
987         }
988         // field[1] m.SwIfIndex
989         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
990         pos += 4
991         // field[1] m.Count
992         buf[pos] = uint8(len(m.Acls))
993         pos += 1
994         // field[1] m.NInput
995         buf[pos] = uint8(m.NInput)
996         pos += 1
997         // field[1] m.Acls
998         for i := 0; i < len(m.Acls); i++ {
999                 var x uint32
1000                 if i < len(m.Acls) {
1001                         x = uint32(m.Acls[i])
1002                 }
1003                 o.PutUint32(buf[pos:pos+4], uint32(x))
1004                 pos += 4
1005         }
1006         return buf, nil
1007 }
1008 func (m *ACLInterfaceListDetails) Unmarshal(tmp []byte) error {
1009         o := binary.BigEndian
1010         _ = o
1011         pos := 0
1012         _ = pos
1013         // field[1] m.SwIfIndex
1014         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1015         pos += 4
1016         // field[1] m.Count
1017         m.Count = uint8(tmp[pos])
1018         pos += 1
1019         // field[1] m.NInput
1020         m.NInput = uint8(tmp[pos])
1021         pos += 1
1022         // field[1] m.Acls
1023         m.Acls = make([]uint32, m.Count)
1024         for i := 0; i < len(m.Acls); i++ {
1025                 m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
1026                 pos += 4
1027         }
1028         return nil
1029 }
1030
1031 // ACLInterfaceListDump represents VPP binary API message 'acl_interface_list_dump'.
1032 type ACLInterfaceListDump struct {
1033         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1034 }
1035
1036 func (m *ACLInterfaceListDump) Reset()                        { *m = ACLInterfaceListDump{} }
1037 func (*ACLInterfaceListDump) GetMessageName() string          { return "acl_interface_list_dump" }
1038 func (*ACLInterfaceListDump) GetCrcString() string            { return "529cb13f" }
1039 func (*ACLInterfaceListDump) GetMessageType() api.MessageType { return api.RequestMessage }
1040
1041 func (m *ACLInterfaceListDump) Size() int {
1042         if m == nil {
1043                 return 0
1044         }
1045         var size int
1046         // field[1] m.SwIfIndex
1047         size += 4
1048         return size
1049 }
1050 func (m *ACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
1051         o := binary.BigEndian
1052         _ = o
1053         pos := 0
1054         _ = pos
1055         var buf []byte
1056         if b == nil {
1057                 buf = make([]byte, m.Size())
1058         } else {
1059                 buf = b
1060         }
1061         // field[1] m.SwIfIndex
1062         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1063         pos += 4
1064         return buf, nil
1065 }
1066 func (m *ACLInterfaceListDump) Unmarshal(tmp []byte) error {
1067         o := binary.BigEndian
1068         _ = o
1069         pos := 0
1070         _ = pos
1071         // field[1] m.SwIfIndex
1072         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1073         pos += 4
1074         return nil
1075 }
1076
1077 // ACLInterfaceSetACLList represents VPP binary API message 'acl_interface_set_acl_list'.
1078 type ACLInterfaceSetACLList struct {
1079         SwIfIndex uint32   `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1080         Count     uint8    `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
1081         NInput    uint8    `binapi:"u8,name=n_input" json:"n_input,omitempty"`
1082         Acls      []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
1083 }
1084
1085 func (m *ACLInterfaceSetACLList) Reset()                        { *m = ACLInterfaceSetACLList{} }
1086 func (*ACLInterfaceSetACLList) GetMessageName() string          { return "acl_interface_set_acl_list" }
1087 func (*ACLInterfaceSetACLList) GetCrcString() string            { return "8baece38" }
1088 func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType { return api.RequestMessage }
1089
1090 func (m *ACLInterfaceSetACLList) Size() int {
1091         if m == nil {
1092                 return 0
1093         }
1094         var size int
1095         // field[1] m.SwIfIndex
1096         size += 4
1097         // field[1] m.Count
1098         size += 1
1099         // field[1] m.NInput
1100         size += 1
1101         // field[1] m.Acls
1102         size += 4 * len(m.Acls)
1103         return size
1104 }
1105 func (m *ACLInterfaceSetACLList) Marshal(b []byte) ([]byte, error) {
1106         o := binary.BigEndian
1107         _ = o
1108         pos := 0
1109         _ = pos
1110         var buf []byte
1111         if b == nil {
1112                 buf = make([]byte, m.Size())
1113         } else {
1114                 buf = b
1115         }
1116         // field[1] m.SwIfIndex
1117         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1118         pos += 4
1119         // field[1] m.Count
1120         buf[pos] = uint8(len(m.Acls))
1121         pos += 1
1122         // field[1] m.NInput
1123         buf[pos] = uint8(m.NInput)
1124         pos += 1
1125         // field[1] m.Acls
1126         for i := 0; i < len(m.Acls); i++ {
1127                 var x uint32
1128                 if i < len(m.Acls) {
1129                         x = uint32(m.Acls[i])
1130                 }
1131                 o.PutUint32(buf[pos:pos+4], uint32(x))
1132                 pos += 4
1133         }
1134         return buf, nil
1135 }
1136 func (m *ACLInterfaceSetACLList) Unmarshal(tmp []byte) error {
1137         o := binary.BigEndian
1138         _ = o
1139         pos := 0
1140         _ = pos
1141         // field[1] m.SwIfIndex
1142         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1143         pos += 4
1144         // field[1] m.Count
1145         m.Count = uint8(tmp[pos])
1146         pos += 1
1147         // field[1] m.NInput
1148         m.NInput = uint8(tmp[pos])
1149         pos += 1
1150         // field[1] m.Acls
1151         m.Acls = make([]uint32, m.Count)
1152         for i := 0; i < len(m.Acls); i++ {
1153                 m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
1154                 pos += 4
1155         }
1156         return nil
1157 }
1158
1159 // ACLInterfaceSetACLListReply represents VPP binary API message 'acl_interface_set_acl_list_reply'.
1160 type ACLInterfaceSetACLListReply struct {
1161         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1162 }
1163
1164 func (m *ACLInterfaceSetACLListReply) Reset() { *m = ACLInterfaceSetACLListReply{} }
1165 func (*ACLInterfaceSetACLListReply) GetMessageName() string {
1166         return "acl_interface_set_acl_list_reply"
1167 }
1168 func (*ACLInterfaceSetACLListReply) GetCrcString() string            { return "e8d4e804" }
1169 func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1170
1171 func (m *ACLInterfaceSetACLListReply) Size() int {
1172         if m == nil {
1173                 return 0
1174         }
1175         var size int
1176         // field[1] m.Retval
1177         size += 4
1178         return size
1179 }
1180 func (m *ACLInterfaceSetACLListReply) Marshal(b []byte) ([]byte, error) {
1181         o := binary.BigEndian
1182         _ = o
1183         pos := 0
1184         _ = pos
1185         var buf []byte
1186         if b == nil {
1187                 buf = make([]byte, m.Size())
1188         } else {
1189                 buf = b
1190         }
1191         // field[1] m.Retval
1192         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1193         pos += 4
1194         return buf, nil
1195 }
1196 func (m *ACLInterfaceSetACLListReply) Unmarshal(tmp []byte) error {
1197         o := binary.BigEndian
1198         _ = o
1199         pos := 0
1200         _ = pos
1201         // field[1] m.Retval
1202         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1203         pos += 4
1204         return nil
1205 }
1206
1207 // ACLInterfaceSetEtypeWhitelist represents VPP binary API message 'acl_interface_set_etype_whitelist'.
1208 type ACLInterfaceSetEtypeWhitelist struct {
1209         SwIfIndex uint32   `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1210         Count     uint8    `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Whitelist"`
1211         NInput    uint8    `binapi:"u8,name=n_input" json:"n_input,omitempty"`
1212         Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
1213 }
1214
1215 func (m *ACLInterfaceSetEtypeWhitelist) Reset() { *m = ACLInterfaceSetEtypeWhitelist{} }
1216 func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string {
1217         return "acl_interface_set_etype_whitelist"
1218 }
1219 func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string            { return "f515efc5" }
1220 func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType { return api.RequestMessage }
1221
1222 func (m *ACLInterfaceSetEtypeWhitelist) Size() int {
1223         if m == nil {
1224                 return 0
1225         }
1226         var size int
1227         // field[1] m.SwIfIndex
1228         size += 4
1229         // field[1] m.Count
1230         size += 1
1231         // field[1] m.NInput
1232         size += 1
1233         // field[1] m.Whitelist
1234         size += 2 * len(m.Whitelist)
1235         return size
1236 }
1237 func (m *ACLInterfaceSetEtypeWhitelist) Marshal(b []byte) ([]byte, error) {
1238         o := binary.BigEndian
1239         _ = o
1240         pos := 0
1241         _ = pos
1242         var buf []byte
1243         if b == nil {
1244                 buf = make([]byte, m.Size())
1245         } else {
1246                 buf = b
1247         }
1248         // field[1] m.SwIfIndex
1249         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1250         pos += 4
1251         // field[1] m.Count
1252         buf[pos] = uint8(len(m.Whitelist))
1253         pos += 1
1254         // field[1] m.NInput
1255         buf[pos] = uint8(m.NInput)
1256         pos += 1
1257         // field[1] m.Whitelist
1258         for i := 0; i < len(m.Whitelist); i++ {
1259                 var x uint16
1260                 if i < len(m.Whitelist) {
1261                         x = uint16(m.Whitelist[i])
1262                 }
1263                 o.PutUint16(buf[pos:pos+2], uint16(x))
1264                 pos += 2
1265         }
1266         return buf, nil
1267 }
1268 func (m *ACLInterfaceSetEtypeWhitelist) Unmarshal(tmp []byte) error {
1269         o := binary.BigEndian
1270         _ = o
1271         pos := 0
1272         _ = pos
1273         // field[1] m.SwIfIndex
1274         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1275         pos += 4
1276         // field[1] m.Count
1277         m.Count = uint8(tmp[pos])
1278         pos += 1
1279         // field[1] m.NInput
1280         m.NInput = uint8(tmp[pos])
1281         pos += 1
1282         // field[1] m.Whitelist
1283         m.Whitelist = make([]uint16, m.Count)
1284         for i := 0; i < len(m.Whitelist); i++ {
1285                 m.Whitelist[i] = uint16(o.Uint16(tmp[pos : pos+2]))
1286                 pos += 2
1287         }
1288         return nil
1289 }
1290
1291 // ACLInterfaceSetEtypeWhitelistReply represents VPP binary API message 'acl_interface_set_etype_whitelist_reply'.
1292 type ACLInterfaceSetEtypeWhitelistReply struct {
1293         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1294 }
1295
1296 func (m *ACLInterfaceSetEtypeWhitelistReply) Reset() { *m = ACLInterfaceSetEtypeWhitelistReply{} }
1297 func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string {
1298         return "acl_interface_set_etype_whitelist_reply"
1299 }
1300 func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string            { return "e8d4e804" }
1301 func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1302
1303 func (m *ACLInterfaceSetEtypeWhitelistReply) Size() int {
1304         if m == nil {
1305                 return 0
1306         }
1307         var size int
1308         // field[1] m.Retval
1309         size += 4
1310         return size
1311 }
1312 func (m *ACLInterfaceSetEtypeWhitelistReply) Marshal(b []byte) ([]byte, error) {
1313         o := binary.BigEndian
1314         _ = o
1315         pos := 0
1316         _ = pos
1317         var buf []byte
1318         if b == nil {
1319                 buf = make([]byte, m.Size())
1320         } else {
1321                 buf = b
1322         }
1323         // field[1] m.Retval
1324         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1325         pos += 4
1326         return buf, nil
1327 }
1328 func (m *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(tmp []byte) error {
1329         o := binary.BigEndian
1330         _ = o
1331         pos := 0
1332         _ = pos
1333         // field[1] m.Retval
1334         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1335         pos += 4
1336         return nil
1337 }
1338
1339 // ACLPluginControlPing represents VPP binary API message 'acl_plugin_control_ping'.
1340 type ACLPluginControlPing struct{}
1341
1342 func (m *ACLPluginControlPing) Reset()                        { *m = ACLPluginControlPing{} }
1343 func (*ACLPluginControlPing) GetMessageName() string          { return "acl_plugin_control_ping" }
1344 func (*ACLPluginControlPing) GetCrcString() string            { return "51077d14" }
1345 func (*ACLPluginControlPing) GetMessageType() api.MessageType { return api.RequestMessage }
1346
1347 func (m *ACLPluginControlPing) Size() int {
1348         if m == nil {
1349                 return 0
1350         }
1351         var size int
1352         return size
1353 }
1354 func (m *ACLPluginControlPing) Marshal(b []byte) ([]byte, error) {
1355         o := binary.BigEndian
1356         _ = o
1357         pos := 0
1358         _ = pos
1359         var buf []byte
1360         if b == nil {
1361                 buf = make([]byte, m.Size())
1362         } else {
1363                 buf = b
1364         }
1365         return buf, nil
1366 }
1367 func (m *ACLPluginControlPing) Unmarshal(tmp []byte) error {
1368         o := binary.BigEndian
1369         _ = o
1370         pos := 0
1371         _ = pos
1372         return nil
1373 }
1374
1375 // ACLPluginControlPingReply represents VPP binary API message 'acl_plugin_control_ping_reply'.
1376 type ACLPluginControlPingReply struct {
1377         Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1378         ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
1379         VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
1380 }
1381
1382 func (m *ACLPluginControlPingReply) Reset()                        { *m = ACLPluginControlPingReply{} }
1383 func (*ACLPluginControlPingReply) GetMessageName() string          { return "acl_plugin_control_ping_reply" }
1384 func (*ACLPluginControlPingReply) GetCrcString() string            { return "f6b0b8ca" }
1385 func (*ACLPluginControlPingReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1386
1387 func (m *ACLPluginControlPingReply) Size() int {
1388         if m == nil {
1389                 return 0
1390         }
1391         var size int
1392         // field[1] m.Retval
1393         size += 4
1394         // field[1] m.ClientIndex
1395         size += 4
1396         // field[1] m.VpePID
1397         size += 4
1398         return size
1399 }
1400 func (m *ACLPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
1401         o := binary.BigEndian
1402         _ = o
1403         pos := 0
1404         _ = pos
1405         var buf []byte
1406         if b == nil {
1407                 buf = make([]byte, m.Size())
1408         } else {
1409                 buf = b
1410         }
1411         // field[1] m.Retval
1412         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1413         pos += 4
1414         // field[1] m.ClientIndex
1415         o.PutUint32(buf[pos:pos+4], uint32(m.ClientIndex))
1416         pos += 4
1417         // field[1] m.VpePID
1418         o.PutUint32(buf[pos:pos+4], uint32(m.VpePID))
1419         pos += 4
1420         return buf, nil
1421 }
1422 func (m *ACLPluginControlPingReply) Unmarshal(tmp []byte) error {
1423         o := binary.BigEndian
1424         _ = o
1425         pos := 0
1426         _ = pos
1427         // field[1] m.Retval
1428         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1429         pos += 4
1430         // field[1] m.ClientIndex
1431         m.ClientIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1432         pos += 4
1433         // field[1] m.VpePID
1434         m.VpePID = uint32(o.Uint32(tmp[pos : pos+4]))
1435         pos += 4
1436         return nil
1437 }
1438
1439 // ACLPluginGetConnTableMaxEntries represents VPP binary API message 'acl_plugin_get_conn_table_max_entries'.
1440 type ACLPluginGetConnTableMaxEntries struct{}
1441
1442 func (m *ACLPluginGetConnTableMaxEntries) Reset() { *m = ACLPluginGetConnTableMaxEntries{} }
1443 func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string {
1444         return "acl_plugin_get_conn_table_max_entries"
1445 }
1446 func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string            { return "51077d14" }
1447 func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType { return api.RequestMessage }
1448
1449 func (m *ACLPluginGetConnTableMaxEntries) Size() int {
1450         if m == nil {
1451                 return 0
1452         }
1453         var size int
1454         return size
1455 }
1456 func (m *ACLPluginGetConnTableMaxEntries) Marshal(b []byte) ([]byte, error) {
1457         o := binary.BigEndian
1458         _ = o
1459         pos := 0
1460         _ = pos
1461         var buf []byte
1462         if b == nil {
1463                 buf = make([]byte, m.Size())
1464         } else {
1465                 buf = b
1466         }
1467         return buf, nil
1468 }
1469 func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(tmp []byte) error {
1470         o := binary.BigEndian
1471         _ = o
1472         pos := 0
1473         _ = pos
1474         return nil
1475 }
1476
1477 // ACLPluginGetConnTableMaxEntriesReply represents VPP binary API message 'acl_plugin_get_conn_table_max_entries_reply'.
1478 type ACLPluginGetConnTableMaxEntriesReply struct {
1479         ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"`
1480 }
1481
1482 func (m *ACLPluginGetConnTableMaxEntriesReply) Reset() { *m = ACLPluginGetConnTableMaxEntriesReply{} }
1483 func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageName() string {
1484         return "acl_plugin_get_conn_table_max_entries_reply"
1485 }
1486 func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string { return "7a096d3d" }
1487 func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType {
1488         return api.ReplyMessage
1489 }
1490
1491 func (m *ACLPluginGetConnTableMaxEntriesReply) Size() int {
1492         if m == nil {
1493                 return 0
1494         }
1495         var size int
1496         // field[1] m.ConnTableMaxEntries
1497         size += 8
1498         return size
1499 }
1500 func (m *ACLPluginGetConnTableMaxEntriesReply) Marshal(b []byte) ([]byte, error) {
1501         o := binary.BigEndian
1502         _ = o
1503         pos := 0
1504         _ = pos
1505         var buf []byte
1506         if b == nil {
1507                 buf = make([]byte, m.Size())
1508         } else {
1509                 buf = b
1510         }
1511         // field[1] m.ConnTableMaxEntries
1512         o.PutUint64(buf[pos:pos+8], uint64(m.ConnTableMaxEntries))
1513         pos += 8
1514         return buf, nil
1515 }
1516 func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(tmp []byte) error {
1517         o := binary.BigEndian
1518         _ = o
1519         pos := 0
1520         _ = pos
1521         // field[1] m.ConnTableMaxEntries
1522         m.ConnTableMaxEntries = uint64(o.Uint64(tmp[pos : pos+8]))
1523         pos += 8
1524         return nil
1525 }
1526
1527 // ACLPluginGetVersion represents VPP binary API message 'acl_plugin_get_version'.
1528 type ACLPluginGetVersion struct{}
1529
1530 func (m *ACLPluginGetVersion) Reset()                        { *m = ACLPluginGetVersion{} }
1531 func (*ACLPluginGetVersion) GetMessageName() string          { return "acl_plugin_get_version" }
1532 func (*ACLPluginGetVersion) GetCrcString() string            { return "51077d14" }
1533 func (*ACLPluginGetVersion) GetMessageType() api.MessageType { return api.RequestMessage }
1534
1535 func (m *ACLPluginGetVersion) Size() int {
1536         if m == nil {
1537                 return 0
1538         }
1539         var size int
1540         return size
1541 }
1542 func (m *ACLPluginGetVersion) Marshal(b []byte) ([]byte, error) {
1543         o := binary.BigEndian
1544         _ = o
1545         pos := 0
1546         _ = pos
1547         var buf []byte
1548         if b == nil {
1549                 buf = make([]byte, m.Size())
1550         } else {
1551                 buf = b
1552         }
1553         return buf, nil
1554 }
1555 func (m *ACLPluginGetVersion) Unmarshal(tmp []byte) error {
1556         o := binary.BigEndian
1557         _ = o
1558         pos := 0
1559         _ = pos
1560         return nil
1561 }
1562
1563 // ACLPluginGetVersionReply represents VPP binary API message 'acl_plugin_get_version_reply'.
1564 type ACLPluginGetVersionReply struct {
1565         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
1566         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
1567 }
1568
1569 func (m *ACLPluginGetVersionReply) Reset()                        { *m = ACLPluginGetVersionReply{} }
1570 func (*ACLPluginGetVersionReply) GetMessageName() string          { return "acl_plugin_get_version_reply" }
1571 func (*ACLPluginGetVersionReply) GetCrcString() string            { return "9b32cf86" }
1572 func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1573
1574 func (m *ACLPluginGetVersionReply) Size() int {
1575         if m == nil {
1576                 return 0
1577         }
1578         var size int
1579         // field[1] m.Major
1580         size += 4
1581         // field[1] m.Minor
1582         size += 4
1583         return size
1584 }
1585 func (m *ACLPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
1586         o := binary.BigEndian
1587         _ = o
1588         pos := 0
1589         _ = pos
1590         var buf []byte
1591         if b == nil {
1592                 buf = make([]byte, m.Size())
1593         } else {
1594                 buf = b
1595         }
1596         // field[1] m.Major
1597         o.PutUint32(buf[pos:pos+4], uint32(m.Major))
1598         pos += 4
1599         // field[1] m.Minor
1600         o.PutUint32(buf[pos:pos+4], uint32(m.Minor))
1601         pos += 4
1602         return buf, nil
1603 }
1604 func (m *ACLPluginGetVersionReply) Unmarshal(tmp []byte) error {
1605         o := binary.BigEndian
1606         _ = o
1607         pos := 0
1608         _ = pos
1609         // field[1] m.Major
1610         m.Major = uint32(o.Uint32(tmp[pos : pos+4]))
1611         pos += 4
1612         // field[1] m.Minor
1613         m.Minor = uint32(o.Uint32(tmp[pos : pos+4]))
1614         pos += 4
1615         return nil
1616 }
1617
1618 // ACLStatsIntfCountersEnable represents VPP binary API message 'acl_stats_intf_counters_enable'.
1619 type ACLStatsIntfCountersEnable struct {
1620         Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
1621 }
1622
1623 func (m *ACLStatsIntfCountersEnable) Reset()                        { *m = ACLStatsIntfCountersEnable{} }
1624 func (*ACLStatsIntfCountersEnable) GetMessageName() string          { return "acl_stats_intf_counters_enable" }
1625 func (*ACLStatsIntfCountersEnable) GetCrcString() string            { return "b3e225d2" }
1626 func (*ACLStatsIntfCountersEnable) GetMessageType() api.MessageType { return api.RequestMessage }
1627
1628 func (m *ACLStatsIntfCountersEnable) Size() int {
1629         if m == nil {
1630                 return 0
1631         }
1632         var size int
1633         // field[1] m.Enable
1634         size += 1
1635         return size
1636 }
1637 func (m *ACLStatsIntfCountersEnable) Marshal(b []byte) ([]byte, error) {
1638         o := binary.BigEndian
1639         _ = o
1640         pos := 0
1641         _ = pos
1642         var buf []byte
1643         if b == nil {
1644                 buf = make([]byte, m.Size())
1645         } else {
1646                 buf = b
1647         }
1648         // field[1] m.Enable
1649         if m.Enable {
1650                 buf[pos] = 1
1651         }
1652         pos += 1
1653         return buf, nil
1654 }
1655 func (m *ACLStatsIntfCountersEnable) Unmarshal(tmp []byte) error {
1656         o := binary.BigEndian
1657         _ = o
1658         pos := 0
1659         _ = pos
1660         // field[1] m.Enable
1661         m.Enable = tmp[pos] != 0
1662         pos += 1
1663         return nil
1664 }
1665
1666 // ACLStatsIntfCountersEnableReply represents VPP binary API message 'acl_stats_intf_counters_enable_reply'.
1667 type ACLStatsIntfCountersEnableReply struct {
1668         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1669 }
1670
1671 func (m *ACLStatsIntfCountersEnableReply) Reset() { *m = ACLStatsIntfCountersEnableReply{} }
1672 func (*ACLStatsIntfCountersEnableReply) GetMessageName() string {
1673         return "acl_stats_intf_counters_enable_reply"
1674 }
1675 func (*ACLStatsIntfCountersEnableReply) GetCrcString() string            { return "e8d4e804" }
1676 func (*ACLStatsIntfCountersEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1677
1678 func (m *ACLStatsIntfCountersEnableReply) Size() int {
1679         if m == nil {
1680                 return 0
1681         }
1682         var size int
1683         // field[1] m.Retval
1684         size += 4
1685         return size
1686 }
1687 func (m *ACLStatsIntfCountersEnableReply) Marshal(b []byte) ([]byte, error) {
1688         o := binary.BigEndian
1689         _ = o
1690         pos := 0
1691         _ = pos
1692         var buf []byte
1693         if b == nil {
1694                 buf = make([]byte, m.Size())
1695         } else {
1696                 buf = b
1697         }
1698         // field[1] m.Retval
1699         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1700         pos += 4
1701         return buf, nil
1702 }
1703 func (m *ACLStatsIntfCountersEnableReply) Unmarshal(tmp []byte) error {
1704         o := binary.BigEndian
1705         _ = o
1706         pos := 0
1707         _ = pos
1708         // field[1] m.Retval
1709         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1710         pos += 4
1711         return nil
1712 }
1713
1714 // MacipACLAdd represents VPP binary API message 'macip_acl_add'.
1715 type MacipACLAdd struct {
1716         Tag   []byte         `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
1717         Count uint32         `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
1718         R     []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
1719 }
1720
1721 func (m *MacipACLAdd) Reset()                        { *m = MacipACLAdd{} }
1722 func (*MacipACLAdd) GetMessageName() string          { return "macip_acl_add" }
1723 func (*MacipACLAdd) GetCrcString() string            { return "0c680ca5" }
1724 func (*MacipACLAdd) GetMessageType() api.MessageType { return api.RequestMessage }
1725
1726 func (m *MacipACLAdd) Size() int {
1727         if m == nil {
1728                 return 0
1729         }
1730         var size int
1731         // field[1] m.Tag
1732         size += 64
1733         // field[1] m.Count
1734         size += 4
1735         // field[1] m.R
1736         for j1 := 0; j1 < len(m.R); j1++ {
1737                 var s1 MacipACLRule
1738                 _ = s1
1739                 if j1 < len(m.R) {
1740                         s1 = m.R[j1]
1741                 }
1742                 // field[2] s1.IsPermit
1743                 size += 1
1744                 // field[2] s1.IsIPv6
1745                 size += 1
1746                 // field[2] s1.SrcMac
1747                 size += 6
1748                 // field[2] s1.SrcMacMask
1749                 size += 6
1750                 // field[2] s1.SrcIPAddr
1751                 size += 16
1752                 // field[2] s1.SrcIPPrefixLen
1753                 size += 1
1754         }
1755         return size
1756 }
1757 func (m *MacipACLAdd) Marshal(b []byte) ([]byte, error) {
1758         o := binary.BigEndian
1759         _ = o
1760         pos := 0
1761         _ = pos
1762         var buf []byte
1763         if b == nil {
1764                 buf = make([]byte, m.Size())
1765         } else {
1766                 buf = b
1767         }
1768         // field[1] m.Tag
1769         for i := 0; i < 64; i++ {
1770                 var x uint8
1771                 if i < len(m.Tag) {
1772                         x = uint8(m.Tag[i])
1773                 }
1774                 buf[pos] = uint8(x)
1775                 pos += 1
1776         }
1777         // field[1] m.Count
1778         o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
1779         pos += 4
1780         // field[1] m.R
1781         for j1 := 0; j1 < len(m.R); j1++ {
1782                 var v1 MacipACLRule
1783                 if j1 < len(m.R) {
1784                         v1 = m.R[j1]
1785                 }
1786                 // field[2] v1.IsPermit
1787                 buf[pos] = uint8(v1.IsPermit)
1788                 pos += 1
1789                 // field[2] v1.IsIPv6
1790                 buf[pos] = uint8(v1.IsIPv6)
1791                 pos += 1
1792                 // field[2] v1.SrcMac
1793                 for i := 0; i < 6; i++ {
1794                         var x uint8
1795                         if i < len(v1.SrcMac) {
1796                                 x = uint8(v1.SrcMac[i])
1797                         }
1798                         buf[pos] = uint8(x)
1799                         pos += 1
1800                 }
1801                 // field[2] v1.SrcMacMask
1802                 for i := 0; i < 6; i++ {
1803                         var x uint8
1804                         if i < len(v1.SrcMacMask) {
1805                                 x = uint8(v1.SrcMacMask[i])
1806                         }
1807                         buf[pos] = uint8(x)
1808                         pos += 1
1809                 }
1810                 // field[2] v1.SrcIPAddr
1811                 for i := 0; i < 16; i++ {
1812                         var x uint8
1813                         if i < len(v1.SrcIPAddr) {
1814                                 x = uint8(v1.SrcIPAddr[i])
1815                         }
1816                         buf[pos] = uint8(x)
1817                         pos += 1
1818                 }
1819                 // field[2] v1.SrcIPPrefixLen
1820                 buf[pos] = uint8(v1.SrcIPPrefixLen)
1821                 pos += 1
1822         }
1823         return buf, nil
1824 }
1825 func (m *MacipACLAdd) Unmarshal(tmp []byte) error {
1826         o := binary.BigEndian
1827         _ = o
1828         pos := 0
1829         _ = pos
1830         // field[1] m.Tag
1831         m.Tag = make([]uint8, 64)
1832         for i := 0; i < len(m.Tag); i++ {
1833                 m.Tag[i] = uint8(tmp[pos])
1834                 pos += 1
1835         }
1836         // field[1] m.Count
1837         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
1838         pos += 4
1839         // field[1] m.R
1840         m.R = make([]MacipACLRule, int(m.Count))
1841         for j1 := 0; j1 < int(m.Count); j1++ {
1842                 // field[2] m.R[j1].IsPermit
1843                 m.R[j1].IsPermit = uint8(tmp[pos])
1844                 pos += 1
1845                 // field[2] m.R[j1].IsIPv6
1846                 m.R[j1].IsIPv6 = uint8(tmp[pos])
1847                 pos += 1
1848                 // field[2] m.R[j1].SrcMac
1849                 m.R[j1].SrcMac = make([]uint8, 6)
1850                 for i := 0; i < len(m.R[j1].SrcMac); i++ {
1851                         m.R[j1].SrcMac[i] = uint8(tmp[pos])
1852                         pos += 1
1853                 }
1854                 // field[2] m.R[j1].SrcMacMask
1855                 m.R[j1].SrcMacMask = make([]uint8, 6)
1856                 for i := 0; i < len(m.R[j1].SrcMacMask); i++ {
1857                         m.R[j1].SrcMacMask[i] = uint8(tmp[pos])
1858                         pos += 1
1859                 }
1860                 // field[2] m.R[j1].SrcIPAddr
1861                 m.R[j1].SrcIPAddr = make([]uint8, 16)
1862                 for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
1863                         m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
1864                         pos += 1
1865                 }
1866                 // field[2] m.R[j1].SrcIPPrefixLen
1867                 m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
1868                 pos += 1
1869         }
1870         return nil
1871 }
1872
1873 // MacipACLAddReplace represents VPP binary API message 'macip_acl_add_replace'.
1874 type MacipACLAddReplace struct {
1875         ACLIndex uint32         `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
1876         Tag      []byte         `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
1877         Count    uint32         `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
1878         R        []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
1879 }
1880
1881 func (m *MacipACLAddReplace) Reset()                        { *m = MacipACLAddReplace{} }
1882 func (*MacipACLAddReplace) GetMessageName() string          { return "macip_acl_add_replace" }
1883 func (*MacipACLAddReplace) GetCrcString() string            { return "d3d313e7" }
1884 func (*MacipACLAddReplace) GetMessageType() api.MessageType { return api.RequestMessage }
1885
1886 func (m *MacipACLAddReplace) Size() int {
1887         if m == nil {
1888                 return 0
1889         }
1890         var size int
1891         // field[1] m.ACLIndex
1892         size += 4
1893         // field[1] m.Tag
1894         size += 64
1895         // field[1] m.Count
1896         size += 4
1897         // field[1] m.R
1898         for j1 := 0; j1 < len(m.R); j1++ {
1899                 var s1 MacipACLRule
1900                 _ = s1
1901                 if j1 < len(m.R) {
1902                         s1 = m.R[j1]
1903                 }
1904                 // field[2] s1.IsPermit
1905                 size += 1
1906                 // field[2] s1.IsIPv6
1907                 size += 1
1908                 // field[2] s1.SrcMac
1909                 size += 6
1910                 // field[2] s1.SrcMacMask
1911                 size += 6
1912                 // field[2] s1.SrcIPAddr
1913                 size += 16
1914                 // field[2] s1.SrcIPPrefixLen
1915                 size += 1
1916         }
1917         return size
1918 }
1919 func (m *MacipACLAddReplace) Marshal(b []byte) ([]byte, error) {
1920         o := binary.BigEndian
1921         _ = o
1922         pos := 0
1923         _ = pos
1924         var buf []byte
1925         if b == nil {
1926                 buf = make([]byte, m.Size())
1927         } else {
1928                 buf = b
1929         }
1930         // field[1] m.ACLIndex
1931         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
1932         pos += 4
1933         // field[1] m.Tag
1934         for i := 0; i < 64; i++ {
1935                 var x uint8
1936                 if i < len(m.Tag) {
1937                         x = uint8(m.Tag[i])
1938                 }
1939                 buf[pos] = uint8(x)
1940                 pos += 1
1941         }
1942         // field[1] m.Count
1943         o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
1944         pos += 4
1945         // field[1] m.R
1946         for j1 := 0; j1 < len(m.R); j1++ {
1947                 var v1 MacipACLRule
1948                 if j1 < len(m.R) {
1949                         v1 = m.R[j1]
1950                 }
1951                 // field[2] v1.IsPermit
1952                 buf[pos] = uint8(v1.IsPermit)
1953                 pos += 1
1954                 // field[2] v1.IsIPv6
1955                 buf[pos] = uint8(v1.IsIPv6)
1956                 pos += 1
1957                 // field[2] v1.SrcMac
1958                 for i := 0; i < 6; i++ {
1959                         var x uint8
1960                         if i < len(v1.SrcMac) {
1961                                 x = uint8(v1.SrcMac[i])
1962                         }
1963                         buf[pos] = uint8(x)
1964                         pos += 1
1965                 }
1966                 // field[2] v1.SrcMacMask
1967                 for i := 0; i < 6; i++ {
1968                         var x uint8
1969                         if i < len(v1.SrcMacMask) {
1970                                 x = uint8(v1.SrcMacMask[i])
1971                         }
1972                         buf[pos] = uint8(x)
1973                         pos += 1
1974                 }
1975                 // field[2] v1.SrcIPAddr
1976                 for i := 0; i < 16; i++ {
1977                         var x uint8
1978                         if i < len(v1.SrcIPAddr) {
1979                                 x = uint8(v1.SrcIPAddr[i])
1980                         }
1981                         buf[pos] = uint8(x)
1982                         pos += 1
1983                 }
1984                 // field[2] v1.SrcIPPrefixLen
1985                 buf[pos] = uint8(v1.SrcIPPrefixLen)
1986                 pos += 1
1987         }
1988         return buf, nil
1989 }
1990 func (m *MacipACLAddReplace) Unmarshal(tmp []byte) error {
1991         o := binary.BigEndian
1992         _ = o
1993         pos := 0
1994         _ = pos
1995         // field[1] m.ACLIndex
1996         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1997         pos += 4
1998         // field[1] m.Tag
1999         m.Tag = make([]uint8, 64)
2000         for i := 0; i < len(m.Tag); i++ {
2001                 m.Tag[i] = uint8(tmp[pos])
2002                 pos += 1
2003         }
2004         // field[1] m.Count
2005         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
2006         pos += 4
2007         // field[1] m.R
2008         m.R = make([]MacipACLRule, int(m.Count))
2009         for j1 := 0; j1 < int(m.Count); j1++ {
2010                 // field[2] m.R[j1].IsPermit
2011                 m.R[j1].IsPermit = uint8(tmp[pos])
2012                 pos += 1
2013                 // field[2] m.R[j1].IsIPv6
2014                 m.R[j1].IsIPv6 = uint8(tmp[pos])
2015                 pos += 1
2016                 // field[2] m.R[j1].SrcMac
2017                 m.R[j1].SrcMac = make([]uint8, 6)
2018                 for i := 0; i < len(m.R[j1].SrcMac); i++ {
2019                         m.R[j1].SrcMac[i] = uint8(tmp[pos])
2020                         pos += 1
2021                 }
2022                 // field[2] m.R[j1].SrcMacMask
2023                 m.R[j1].SrcMacMask = make([]uint8, 6)
2024                 for i := 0; i < len(m.R[j1].SrcMacMask); i++ {
2025                         m.R[j1].SrcMacMask[i] = uint8(tmp[pos])
2026                         pos += 1
2027                 }
2028                 // field[2] m.R[j1].SrcIPAddr
2029                 m.R[j1].SrcIPAddr = make([]uint8, 16)
2030                 for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
2031                         m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
2032                         pos += 1
2033                 }
2034                 // field[2] m.R[j1].SrcIPPrefixLen
2035                 m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
2036                 pos += 1
2037         }
2038         return nil
2039 }
2040
2041 // MacipACLAddReplaceReply represents VPP binary API message 'macip_acl_add_replace_reply'.
2042 type MacipACLAddReplaceReply struct {
2043         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
2044         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2045 }
2046
2047 func (m *MacipACLAddReplaceReply) Reset()                        { *m = MacipACLAddReplaceReply{} }
2048 func (*MacipACLAddReplaceReply) GetMessageName() string          { return "macip_acl_add_replace_reply" }
2049 func (*MacipACLAddReplaceReply) GetCrcString() string            { return "ac407b0c" }
2050 func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2051
2052 func (m *MacipACLAddReplaceReply) Size() int {
2053         if m == nil {
2054                 return 0
2055         }
2056         var size int
2057         // field[1] m.ACLIndex
2058         size += 4
2059         // field[1] m.Retval
2060         size += 4
2061         return size
2062 }
2063 func (m *MacipACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
2064         o := binary.BigEndian
2065         _ = o
2066         pos := 0
2067         _ = pos
2068         var buf []byte
2069         if b == nil {
2070                 buf = make([]byte, m.Size())
2071         } else {
2072                 buf = b
2073         }
2074         // field[1] m.ACLIndex
2075         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
2076         pos += 4
2077         // field[1] m.Retval
2078         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2079         pos += 4
2080         return buf, nil
2081 }
2082 func (m *MacipACLAddReplaceReply) Unmarshal(tmp []byte) error {
2083         o := binary.BigEndian
2084         _ = o
2085         pos := 0
2086         _ = pos
2087         // field[1] m.ACLIndex
2088         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2089         pos += 4
2090         // field[1] m.Retval
2091         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2092         pos += 4
2093         return nil
2094 }
2095
2096 // MacipACLAddReply represents VPP binary API message 'macip_acl_add_reply'.
2097 type MacipACLAddReply struct {
2098         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
2099         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2100 }
2101
2102 func (m *MacipACLAddReply) Reset()                        { *m = MacipACLAddReply{} }
2103 func (*MacipACLAddReply) GetMessageName() string          { return "macip_acl_add_reply" }
2104 func (*MacipACLAddReply) GetCrcString() string            { return "ac407b0c" }
2105 func (*MacipACLAddReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2106
2107 func (m *MacipACLAddReply) Size() int {
2108         if m == nil {
2109                 return 0
2110         }
2111         var size int
2112         // field[1] m.ACLIndex
2113         size += 4
2114         // field[1] m.Retval
2115         size += 4
2116         return size
2117 }
2118 func (m *MacipACLAddReply) Marshal(b []byte) ([]byte, error) {
2119         o := binary.BigEndian
2120         _ = o
2121         pos := 0
2122         _ = pos
2123         var buf []byte
2124         if b == nil {
2125                 buf = make([]byte, m.Size())
2126         } else {
2127                 buf = b
2128         }
2129         // field[1] m.ACLIndex
2130         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
2131         pos += 4
2132         // field[1] m.Retval
2133         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2134         pos += 4
2135         return buf, nil
2136 }
2137 func (m *MacipACLAddReply) Unmarshal(tmp []byte) error {
2138         o := binary.BigEndian
2139         _ = o
2140         pos := 0
2141         _ = pos
2142         // field[1] m.ACLIndex
2143         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2144         pos += 4
2145         // field[1] m.Retval
2146         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2147         pos += 4
2148         return nil
2149 }
2150
2151 // MacipACLDel represents VPP binary API message 'macip_acl_del'.
2152 type MacipACLDel struct {
2153         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
2154 }
2155
2156 func (m *MacipACLDel) Reset()                        { *m = MacipACLDel{} }
2157 func (*MacipACLDel) GetMessageName() string          { return "macip_acl_del" }
2158 func (*MacipACLDel) GetCrcString() string            { return "ef34fea4" }
2159 func (*MacipACLDel) GetMessageType() api.MessageType { return api.RequestMessage }
2160
2161 func (m *MacipACLDel) Size() int {
2162         if m == nil {
2163                 return 0
2164         }
2165         var size int
2166         // field[1] m.ACLIndex
2167         size += 4
2168         return size
2169 }
2170 func (m *MacipACLDel) Marshal(b []byte) ([]byte, error) {
2171         o := binary.BigEndian
2172         _ = o
2173         pos := 0
2174         _ = pos
2175         var buf []byte
2176         if b == nil {
2177                 buf = make([]byte, m.Size())
2178         } else {
2179                 buf = b
2180         }
2181         // field[1] m.ACLIndex
2182         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
2183         pos += 4
2184         return buf, nil
2185 }
2186 func (m *MacipACLDel) Unmarshal(tmp []byte) error {
2187         o := binary.BigEndian
2188         _ = o
2189         pos := 0
2190         _ = pos
2191         // field[1] m.ACLIndex
2192         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2193         pos += 4
2194         return nil
2195 }
2196
2197 // MacipACLDelReply represents VPP binary API message 'macip_acl_del_reply'.
2198 type MacipACLDelReply struct {
2199         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2200 }
2201
2202 func (m *MacipACLDelReply) Reset()                        { *m = MacipACLDelReply{} }
2203 func (*MacipACLDelReply) GetMessageName() string          { return "macip_acl_del_reply" }
2204 func (*MacipACLDelReply) GetCrcString() string            { return "e8d4e804" }
2205 func (*MacipACLDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2206
2207 func (m *MacipACLDelReply) Size() int {
2208         if m == nil {
2209                 return 0
2210         }
2211         var size int
2212         // field[1] m.Retval
2213         size += 4
2214         return size
2215 }
2216 func (m *MacipACLDelReply) Marshal(b []byte) ([]byte, error) {
2217         o := binary.BigEndian
2218         _ = o
2219         pos := 0
2220         _ = pos
2221         var buf []byte
2222         if b == nil {
2223                 buf = make([]byte, m.Size())
2224         } else {
2225                 buf = b
2226         }
2227         // field[1] m.Retval
2228         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2229         pos += 4
2230         return buf, nil
2231 }
2232 func (m *MacipACLDelReply) Unmarshal(tmp []byte) error {
2233         o := binary.BigEndian
2234         _ = o
2235         pos := 0
2236         _ = pos
2237         // field[1] m.Retval
2238         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2239         pos += 4
2240         return nil
2241 }
2242
2243 // MacipACLDetails represents VPP binary API message 'macip_acl_details'.
2244 type MacipACLDetails struct {
2245         ACLIndex uint32         `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
2246         Tag      []byte         `binapi:"u8[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
2247         Count    uint32         `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=R"`
2248         R        []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
2249 }
2250
2251 func (m *MacipACLDetails) Reset()                        { *m = MacipACLDetails{} }
2252 func (*MacipACLDetails) GetMessageName() string          { return "macip_acl_details" }
2253 func (*MacipACLDetails) GetCrcString() string            { return "e164e69a" }
2254 func (*MacipACLDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
2255
2256 func (m *MacipACLDetails) Size() int {
2257         if m == nil {
2258                 return 0
2259         }
2260         var size int
2261         // field[1] m.ACLIndex
2262         size += 4
2263         // field[1] m.Tag
2264         size += 64
2265         // field[1] m.Count
2266         size += 4
2267         // field[1] m.R
2268         for j1 := 0; j1 < len(m.R); j1++ {
2269                 var s1 MacipACLRule
2270                 _ = s1
2271                 if j1 < len(m.R) {
2272                         s1 = m.R[j1]
2273                 }
2274                 // field[2] s1.IsPermit
2275                 size += 1
2276                 // field[2] s1.IsIPv6
2277                 size += 1
2278                 // field[2] s1.SrcMac
2279                 size += 6
2280                 // field[2] s1.SrcMacMask
2281                 size += 6
2282                 // field[2] s1.SrcIPAddr
2283                 size += 16
2284                 // field[2] s1.SrcIPPrefixLen
2285                 size += 1
2286         }
2287         return size
2288 }
2289 func (m *MacipACLDetails) Marshal(b []byte) ([]byte, error) {
2290         o := binary.BigEndian
2291         _ = o
2292         pos := 0
2293         _ = pos
2294         var buf []byte
2295         if b == nil {
2296                 buf = make([]byte, m.Size())
2297         } else {
2298                 buf = b
2299         }
2300         // field[1] m.ACLIndex
2301         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
2302         pos += 4
2303         // field[1] m.Tag
2304         for i := 0; i < 64; i++ {
2305                 var x uint8
2306                 if i < len(m.Tag) {
2307                         x = uint8(m.Tag[i])
2308                 }
2309                 buf[pos] = uint8(x)
2310                 pos += 1
2311         }
2312         // field[1] m.Count
2313         o.PutUint32(buf[pos:pos+4], uint32(len(m.R)))
2314         pos += 4
2315         // field[1] m.R
2316         for j1 := 0; j1 < len(m.R); j1++ {
2317                 var v1 MacipACLRule
2318                 if j1 < len(m.R) {
2319                         v1 = m.R[j1]
2320                 }
2321                 // field[2] v1.IsPermit
2322                 buf[pos] = uint8(v1.IsPermit)
2323                 pos += 1
2324                 // field[2] v1.IsIPv6
2325                 buf[pos] = uint8(v1.IsIPv6)
2326                 pos += 1
2327                 // field[2] v1.SrcMac
2328                 for i := 0; i < 6; i++ {
2329                         var x uint8
2330                         if i < len(v1.SrcMac) {
2331                                 x = uint8(v1.SrcMac[i])
2332                         }
2333                         buf[pos] = uint8(x)
2334                         pos += 1
2335                 }
2336                 // field[2] v1.SrcMacMask
2337                 for i := 0; i < 6; i++ {
2338                         var x uint8
2339                         if i < len(v1.SrcMacMask) {
2340                                 x = uint8(v1.SrcMacMask[i])
2341                         }
2342                         buf[pos] = uint8(x)
2343                         pos += 1
2344                 }
2345                 // field[2] v1.SrcIPAddr
2346                 for i := 0; i < 16; i++ {
2347                         var x uint8
2348                         if i < len(v1.SrcIPAddr) {
2349                                 x = uint8(v1.SrcIPAddr[i])
2350                         }
2351                         buf[pos] = uint8(x)
2352                         pos += 1
2353                 }
2354                 // field[2] v1.SrcIPPrefixLen
2355                 buf[pos] = uint8(v1.SrcIPPrefixLen)
2356                 pos += 1
2357         }
2358         return buf, nil
2359 }
2360 func (m *MacipACLDetails) Unmarshal(tmp []byte) error {
2361         o := binary.BigEndian
2362         _ = o
2363         pos := 0
2364         _ = pos
2365         // field[1] m.ACLIndex
2366         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2367         pos += 4
2368         // field[1] m.Tag
2369         m.Tag = make([]uint8, 64)
2370         for i := 0; i < len(m.Tag); i++ {
2371                 m.Tag[i] = uint8(tmp[pos])
2372                 pos += 1
2373         }
2374         // field[1] m.Count
2375         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
2376         pos += 4
2377         // field[1] m.R
2378         m.R = make([]MacipACLRule, int(m.Count))
2379         for j1 := 0; j1 < int(m.Count); j1++ {
2380                 // field[2] m.R[j1].IsPermit
2381                 m.R[j1].IsPermit = uint8(tmp[pos])
2382                 pos += 1
2383                 // field[2] m.R[j1].IsIPv6
2384                 m.R[j1].IsIPv6 = uint8(tmp[pos])
2385                 pos += 1
2386                 // field[2] m.R[j1].SrcMac
2387                 m.R[j1].SrcMac = make([]uint8, 6)
2388                 for i := 0; i < len(m.R[j1].SrcMac); i++ {
2389                         m.R[j1].SrcMac[i] = uint8(tmp[pos])
2390                         pos += 1
2391                 }
2392                 // field[2] m.R[j1].SrcMacMask
2393                 m.R[j1].SrcMacMask = make([]uint8, 6)
2394                 for i := 0; i < len(m.R[j1].SrcMacMask); i++ {
2395                         m.R[j1].SrcMacMask[i] = uint8(tmp[pos])
2396                         pos += 1
2397                 }
2398                 // field[2] m.R[j1].SrcIPAddr
2399                 m.R[j1].SrcIPAddr = make([]uint8, 16)
2400                 for i := 0; i < len(m.R[j1].SrcIPAddr); i++ {
2401                         m.R[j1].SrcIPAddr[i] = uint8(tmp[pos])
2402                         pos += 1
2403                 }
2404                 // field[2] m.R[j1].SrcIPPrefixLen
2405                 m.R[j1].SrcIPPrefixLen = uint8(tmp[pos])
2406                 pos += 1
2407         }
2408         return nil
2409 }
2410
2411 // MacipACLDump represents VPP binary API message 'macip_acl_dump'.
2412 type MacipACLDump struct {
2413         ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
2414 }
2415
2416 func (m *MacipACLDump) Reset()                        { *m = MacipACLDump{} }
2417 func (*MacipACLDump) GetMessageName() string          { return "macip_acl_dump" }
2418 func (*MacipACLDump) GetCrcString() string            { return "ef34fea4" }
2419 func (*MacipACLDump) GetMessageType() api.MessageType { return api.RequestMessage }
2420
2421 func (m *MacipACLDump) Size() int {
2422         if m == nil {
2423                 return 0
2424         }
2425         var size int
2426         // field[1] m.ACLIndex
2427         size += 4
2428         return size
2429 }
2430 func (m *MacipACLDump) Marshal(b []byte) ([]byte, error) {
2431         o := binary.BigEndian
2432         _ = o
2433         pos := 0
2434         _ = pos
2435         var buf []byte
2436         if b == nil {
2437                 buf = make([]byte, m.Size())
2438         } else {
2439                 buf = b
2440         }
2441         // field[1] m.ACLIndex
2442         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
2443         pos += 4
2444         return buf, nil
2445 }
2446 func (m *MacipACLDump) Unmarshal(tmp []byte) error {
2447         o := binary.BigEndian
2448         _ = o
2449         pos := 0
2450         _ = pos
2451         // field[1] m.ACLIndex
2452         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2453         pos += 4
2454         return nil
2455 }
2456
2457 // MacipACLInterfaceAddDel represents VPP binary API message 'macip_acl_interface_add_del'.
2458 type MacipACLInterfaceAddDel struct {
2459         IsAdd     uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
2460         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2461         ACLIndex  uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
2462 }
2463
2464 func (m *MacipACLInterfaceAddDel) Reset()                        { *m = MacipACLInterfaceAddDel{} }
2465 func (*MacipACLInterfaceAddDel) GetMessageName() string          { return "macip_acl_interface_add_del" }
2466 func (*MacipACLInterfaceAddDel) GetCrcString() string            { return "6a6be97c" }
2467 func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
2468
2469 func (m *MacipACLInterfaceAddDel) Size() int {
2470         if m == nil {
2471                 return 0
2472         }
2473         var size int
2474         // field[1] m.IsAdd
2475         size += 1
2476         // field[1] m.SwIfIndex
2477         size += 4
2478         // field[1] m.ACLIndex
2479         size += 4
2480         return size
2481 }
2482 func (m *MacipACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
2483         o := binary.BigEndian
2484         _ = o
2485         pos := 0
2486         _ = pos
2487         var buf []byte
2488         if b == nil {
2489                 buf = make([]byte, m.Size())
2490         } else {
2491                 buf = b
2492         }
2493         // field[1] m.IsAdd
2494         buf[pos] = uint8(m.IsAdd)
2495         pos += 1
2496         // field[1] m.SwIfIndex
2497         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2498         pos += 4
2499         // field[1] m.ACLIndex
2500         o.PutUint32(buf[pos:pos+4], uint32(m.ACLIndex))
2501         pos += 4
2502         return buf, nil
2503 }
2504 func (m *MacipACLInterfaceAddDel) Unmarshal(tmp []byte) error {
2505         o := binary.BigEndian
2506         _ = o
2507         pos := 0
2508         _ = pos
2509         // field[1] m.IsAdd
2510         m.IsAdd = uint8(tmp[pos])
2511         pos += 1
2512         // field[1] m.SwIfIndex
2513         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2514         pos += 4
2515         // field[1] m.ACLIndex
2516         m.ACLIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2517         pos += 4
2518         return nil
2519 }
2520
2521 // MacipACLInterfaceAddDelReply represents VPP binary API message 'macip_acl_interface_add_del_reply'.
2522 type MacipACLInterfaceAddDelReply struct {
2523         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2524 }
2525
2526 func (m *MacipACLInterfaceAddDelReply) Reset() { *m = MacipACLInterfaceAddDelReply{} }
2527 func (*MacipACLInterfaceAddDelReply) GetMessageName() string {
2528         return "macip_acl_interface_add_del_reply"
2529 }
2530 func (*MacipACLInterfaceAddDelReply) GetCrcString() string            { return "e8d4e804" }
2531 func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2532
2533 func (m *MacipACLInterfaceAddDelReply) Size() int {
2534         if m == nil {
2535                 return 0
2536         }
2537         var size int
2538         // field[1] m.Retval
2539         size += 4
2540         return size
2541 }
2542 func (m *MacipACLInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
2543         o := binary.BigEndian
2544         _ = o
2545         pos := 0
2546         _ = pos
2547         var buf []byte
2548         if b == nil {
2549                 buf = make([]byte, m.Size())
2550         } else {
2551                 buf = b
2552         }
2553         // field[1] m.Retval
2554         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2555         pos += 4
2556         return buf, nil
2557 }
2558 func (m *MacipACLInterfaceAddDelReply) Unmarshal(tmp []byte) error {
2559         o := binary.BigEndian
2560         _ = o
2561         pos := 0
2562         _ = pos
2563         // field[1] m.Retval
2564         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2565         pos += 4
2566         return nil
2567 }
2568
2569 // MacipACLInterfaceGet represents VPP binary API message 'macip_acl_interface_get'.
2570 type MacipACLInterfaceGet struct{}
2571
2572 func (m *MacipACLInterfaceGet) Reset()                        { *m = MacipACLInterfaceGet{} }
2573 func (*MacipACLInterfaceGet) GetMessageName() string          { return "macip_acl_interface_get" }
2574 func (*MacipACLInterfaceGet) GetCrcString() string            { return "51077d14" }
2575 func (*MacipACLInterfaceGet) GetMessageType() api.MessageType { return api.RequestMessage }
2576
2577 func (m *MacipACLInterfaceGet) Size() int {
2578         if m == nil {
2579                 return 0
2580         }
2581         var size int
2582         return size
2583 }
2584 func (m *MacipACLInterfaceGet) Marshal(b []byte) ([]byte, error) {
2585         o := binary.BigEndian
2586         _ = o
2587         pos := 0
2588         _ = pos
2589         var buf []byte
2590         if b == nil {
2591                 buf = make([]byte, m.Size())
2592         } else {
2593                 buf = b
2594         }
2595         return buf, nil
2596 }
2597 func (m *MacipACLInterfaceGet) Unmarshal(tmp []byte) error {
2598         o := binary.BigEndian
2599         _ = o
2600         pos := 0
2601         _ = pos
2602         return nil
2603 }
2604
2605 // MacipACLInterfaceGetReply represents VPP binary API message 'macip_acl_interface_get_reply'.
2606 type MacipACLInterfaceGetReply struct {
2607         Count uint32   `binapi:"u32,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
2608         Acls  []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
2609 }
2610
2611 func (m *MacipACLInterfaceGetReply) Reset()                        { *m = MacipACLInterfaceGetReply{} }
2612 func (*MacipACLInterfaceGetReply) GetMessageName() string          { return "macip_acl_interface_get_reply" }
2613 func (*MacipACLInterfaceGetReply) GetCrcString() string            { return "accf9b05" }
2614 func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2615
2616 func (m *MacipACLInterfaceGetReply) Size() int {
2617         if m == nil {
2618                 return 0
2619         }
2620         var size int
2621         // field[1] m.Count
2622         size += 4
2623         // field[1] m.Acls
2624         size += 4 * len(m.Acls)
2625         return size
2626 }
2627 func (m *MacipACLInterfaceGetReply) Marshal(b []byte) ([]byte, error) {
2628         o := binary.BigEndian
2629         _ = o
2630         pos := 0
2631         _ = pos
2632         var buf []byte
2633         if b == nil {
2634                 buf = make([]byte, m.Size())
2635         } else {
2636                 buf = b
2637         }
2638         // field[1] m.Count
2639         o.PutUint32(buf[pos:pos+4], uint32(len(m.Acls)))
2640         pos += 4
2641         // field[1] m.Acls
2642         for i := 0; i < len(m.Acls); i++ {
2643                 var x uint32
2644                 if i < len(m.Acls) {
2645                         x = uint32(m.Acls[i])
2646                 }
2647                 o.PutUint32(buf[pos:pos+4], uint32(x))
2648                 pos += 4
2649         }
2650         return buf, nil
2651 }
2652 func (m *MacipACLInterfaceGetReply) Unmarshal(tmp []byte) error {
2653         o := binary.BigEndian
2654         _ = o
2655         pos := 0
2656         _ = pos
2657         // field[1] m.Count
2658         m.Count = uint32(o.Uint32(tmp[pos : pos+4]))
2659         pos += 4
2660         // field[1] m.Acls
2661         m.Acls = make([]uint32, m.Count)
2662         for i := 0; i < len(m.Acls); i++ {
2663                 m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
2664                 pos += 4
2665         }
2666         return nil
2667 }
2668
2669 // MacipACLInterfaceListDetails represents VPP binary API message 'macip_acl_interface_list_details'.
2670 type MacipACLInterfaceListDetails struct {
2671         SwIfIndex uint32   `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2672         Count     uint8    `binapi:"u8,name=count" json:"count,omitempty" struc:"sizeof=Acls"`
2673         Acls      []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
2674 }
2675
2676 func (m *MacipACLInterfaceListDetails) Reset() { *m = MacipACLInterfaceListDetails{} }
2677 func (*MacipACLInterfaceListDetails) GetMessageName() string {
2678         return "macip_acl_interface_list_details"
2679 }
2680 func (*MacipACLInterfaceListDetails) GetCrcString() string            { return "29783fa0" }
2681 func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
2682
2683 func (m *MacipACLInterfaceListDetails) Size() int {
2684         if m == nil {
2685                 return 0
2686         }
2687         var size int
2688         // field[1] m.SwIfIndex
2689         size += 4
2690         // field[1] m.Count
2691         size += 1
2692         // field[1] m.Acls
2693         size += 4 * len(m.Acls)
2694         return size
2695 }
2696 func (m *MacipACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
2697         o := binary.BigEndian
2698         _ = o
2699         pos := 0
2700         _ = pos
2701         var buf []byte
2702         if b == nil {
2703                 buf = make([]byte, m.Size())
2704         } else {
2705                 buf = b
2706         }
2707         // field[1] m.SwIfIndex
2708         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2709         pos += 4
2710         // field[1] m.Count
2711         buf[pos] = uint8(len(m.Acls))
2712         pos += 1
2713         // field[1] m.Acls
2714         for i := 0; i < len(m.Acls); i++ {
2715                 var x uint32
2716                 if i < len(m.Acls) {
2717                         x = uint32(m.Acls[i])
2718                 }
2719                 o.PutUint32(buf[pos:pos+4], uint32(x))
2720                 pos += 4
2721         }
2722         return buf, nil
2723 }
2724 func (m *MacipACLInterfaceListDetails) Unmarshal(tmp []byte) error {
2725         o := binary.BigEndian
2726         _ = o
2727         pos := 0
2728         _ = pos
2729         // field[1] m.SwIfIndex
2730         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2731         pos += 4
2732         // field[1] m.Count
2733         m.Count = uint8(tmp[pos])
2734         pos += 1
2735         // field[1] m.Acls
2736         m.Acls = make([]uint32, m.Count)
2737         for i := 0; i < len(m.Acls); i++ {
2738                 m.Acls[i] = uint32(o.Uint32(tmp[pos : pos+4]))
2739                 pos += 4
2740         }
2741         return nil
2742 }
2743
2744 // MacipACLInterfaceListDump represents VPP binary API message 'macip_acl_interface_list_dump'.
2745 type MacipACLInterfaceListDump struct {
2746         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2747 }
2748
2749 func (m *MacipACLInterfaceListDump) Reset()                        { *m = MacipACLInterfaceListDump{} }
2750 func (*MacipACLInterfaceListDump) GetMessageName() string          { return "macip_acl_interface_list_dump" }
2751 func (*MacipACLInterfaceListDump) GetCrcString() string            { return "529cb13f" }
2752 func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType { return api.RequestMessage }
2753
2754 func (m *MacipACLInterfaceListDump) Size() int {
2755         if m == nil {
2756                 return 0
2757         }
2758         var size int
2759         // field[1] m.SwIfIndex
2760         size += 4
2761         return size
2762 }
2763 func (m *MacipACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
2764         o := binary.BigEndian
2765         _ = o
2766         pos := 0
2767         _ = pos
2768         var buf []byte
2769         if b == nil {
2770                 buf = make([]byte, m.Size())
2771         } else {
2772                 buf = b
2773         }
2774         // field[1] m.SwIfIndex
2775         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2776         pos += 4
2777         return buf, nil
2778 }
2779 func (m *MacipACLInterfaceListDump) Unmarshal(tmp []byte) error {
2780         o := binary.BigEndian
2781         _ = o
2782         pos := 0
2783         _ = pos
2784         // field[1] m.SwIfIndex
2785         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2786         pos += 4
2787         return nil
2788 }
2789
2790 func init() { file_acl_binapi_init() }
2791 func file_acl_binapi_init() {
2792         api.RegisterMessage((*ACLAddReplace)(nil), "acl.ACLAddReplace")
2793         api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl.ACLAddReplaceReply")
2794         api.RegisterMessage((*ACLDel)(nil), "acl.ACLDel")
2795         api.RegisterMessage((*ACLDelReply)(nil), "acl.ACLDelReply")
2796         api.RegisterMessage((*ACLDetails)(nil), "acl.ACLDetails")
2797         api.RegisterMessage((*ACLDump)(nil), "acl.ACLDump")
2798         api.RegisterMessage((*ACLInterfaceAddDel)(nil), "acl.ACLInterfaceAddDel")
2799         api.RegisterMessage((*ACLInterfaceAddDelReply)(nil), "acl.ACLInterfaceAddDelReply")
2800         api.RegisterMessage((*ACLInterfaceEtypeWhitelistDetails)(nil), "acl.ACLInterfaceEtypeWhitelistDetails")
2801         api.RegisterMessage((*ACLInterfaceEtypeWhitelistDump)(nil), "acl.ACLInterfaceEtypeWhitelistDump")
2802         api.RegisterMessage((*ACLInterfaceListDetails)(nil), "acl.ACLInterfaceListDetails")
2803         api.RegisterMessage((*ACLInterfaceListDump)(nil), "acl.ACLInterfaceListDump")
2804         api.RegisterMessage((*ACLInterfaceSetACLList)(nil), "acl.ACLInterfaceSetACLList")
2805         api.RegisterMessage((*ACLInterfaceSetACLListReply)(nil), "acl.ACLInterfaceSetACLListReply")
2806         api.RegisterMessage((*ACLInterfaceSetEtypeWhitelist)(nil), "acl.ACLInterfaceSetEtypeWhitelist")
2807         api.RegisterMessage((*ACLInterfaceSetEtypeWhitelistReply)(nil), "acl.ACLInterfaceSetEtypeWhitelistReply")
2808         api.RegisterMessage((*ACLPluginControlPing)(nil), "acl.ACLPluginControlPing")
2809         api.RegisterMessage((*ACLPluginControlPingReply)(nil), "acl.ACLPluginControlPingReply")
2810         api.RegisterMessage((*ACLPluginGetConnTableMaxEntries)(nil), "acl.ACLPluginGetConnTableMaxEntries")
2811         api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl.ACLPluginGetConnTableMaxEntriesReply")
2812         api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl.ACLPluginGetVersion")
2813         api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl.ACLPluginGetVersionReply")
2814         api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl.ACLStatsIntfCountersEnable")
2815         api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl.ACLStatsIntfCountersEnableReply")
2816         api.RegisterMessage((*MacipACLAdd)(nil), "acl.MacipACLAdd")
2817         api.RegisterMessage((*MacipACLAddReplace)(nil), "acl.MacipACLAddReplace")
2818         api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "acl.MacipACLAddReplaceReply")
2819         api.RegisterMessage((*MacipACLAddReply)(nil), "acl.MacipACLAddReply")
2820         api.RegisterMessage((*MacipACLDel)(nil), "acl.MacipACLDel")
2821         api.RegisterMessage((*MacipACLDelReply)(nil), "acl.MacipACLDelReply")
2822         api.RegisterMessage((*MacipACLDetails)(nil), "acl.MacipACLDetails")
2823         api.RegisterMessage((*MacipACLDump)(nil), "acl.MacipACLDump")
2824         api.RegisterMessage((*MacipACLInterfaceAddDel)(nil), "acl.MacipACLInterfaceAddDel")
2825         api.RegisterMessage((*MacipACLInterfaceAddDelReply)(nil), "acl.MacipACLInterfaceAddDelReply")
2826         api.RegisterMessage((*MacipACLInterfaceGet)(nil), "acl.MacipACLInterfaceGet")
2827         api.RegisterMessage((*MacipACLInterfaceGetReply)(nil), "acl.MacipACLInterfaceGetReply")
2828         api.RegisterMessage((*MacipACLInterfaceListDetails)(nil), "acl.MacipACLInterfaceListDetails")
2829         api.RegisterMessage((*MacipACLInterfaceListDump)(nil), "acl.MacipACLInterfaceListDump")
2830 }
2831
2832 // Messages returns list of all messages in this module.
2833 func AllMessages() []api.Message {
2834         return []api.Message{
2835                 (*ACLAddReplace)(nil),
2836                 (*ACLAddReplaceReply)(nil),
2837                 (*ACLDel)(nil),
2838                 (*ACLDelReply)(nil),
2839                 (*ACLDetails)(nil),
2840                 (*ACLDump)(nil),
2841                 (*ACLInterfaceAddDel)(nil),
2842                 (*ACLInterfaceAddDelReply)(nil),
2843                 (*ACLInterfaceEtypeWhitelistDetails)(nil),
2844                 (*ACLInterfaceEtypeWhitelistDump)(nil),
2845                 (*ACLInterfaceListDetails)(nil),
2846                 (*ACLInterfaceListDump)(nil),
2847                 (*ACLInterfaceSetACLList)(nil),
2848                 (*ACLInterfaceSetACLListReply)(nil),
2849                 (*ACLInterfaceSetEtypeWhitelist)(nil),
2850                 (*ACLInterfaceSetEtypeWhitelistReply)(nil),
2851                 (*ACLPluginControlPing)(nil),
2852                 (*ACLPluginControlPingReply)(nil),
2853                 (*ACLPluginGetConnTableMaxEntries)(nil),
2854                 (*ACLPluginGetConnTableMaxEntriesReply)(nil),
2855                 (*ACLPluginGetVersion)(nil),
2856                 (*ACLPluginGetVersionReply)(nil),
2857                 (*ACLStatsIntfCountersEnable)(nil),
2858                 (*ACLStatsIntfCountersEnableReply)(nil),
2859                 (*MacipACLAdd)(nil),
2860                 (*MacipACLAddReplace)(nil),
2861                 (*MacipACLAddReplaceReply)(nil),
2862                 (*MacipACLAddReply)(nil),
2863                 (*MacipACLDel)(nil),
2864                 (*MacipACLDelReply)(nil),
2865                 (*MacipACLDetails)(nil),
2866                 (*MacipACLDump)(nil),
2867                 (*MacipACLInterfaceAddDel)(nil),
2868                 (*MacipACLInterfaceAddDelReply)(nil),
2869                 (*MacipACLInterfaceGet)(nil),
2870                 (*MacipACLInterfaceGetReply)(nil),
2871                 (*MacipACLInterfaceListDetails)(nil),
2872                 (*MacipACLInterfaceListDump)(nil),
2873         }
2874 }
2875
2876 // Reference imports to suppress errors if they are not otherwise used.
2877 var _ = api.RegisterMessage
2878 var _ = codec.DecodeString
2879 var _ = bytes.NewBuffer
2880 var _ = context.Background
2881 var _ = io.Copy
2882 var _ = strconv.Itoa
2883 var _ = struc.Pack
2884 var _ = binary.BigEndian
2885 var _ = math.Float32bits