Refactored binapi generator with message encoding
[govpp.git] / examples / binapi / interfaces / interfaces.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/core/interface.api.json
6
7 /*
8 Package interfaces contains generated code for VPP binary API defined by interface.api (version 3.2.2).
9
10 It consists of:
11           7 aliases
12          10 enums
13          53 messages
14           6 types
15           1 union
16 */
17 package interfaces
18
19 import (
20         "bytes"
21         "context"
22         "encoding/binary"
23         "io"
24         "math"
25         "strconv"
26
27         api "git.fd.io/govpp.git/api"
28         codec "git.fd.io/govpp.git/codec"
29         struc "github.com/lunixbochs/struc"
30 )
31
32 // This is a compile-time assertion to ensure that this generated file
33 // is compatible with the GoVPP api package it is being compiled against.
34 // A compilation error at this line likely means your copy of the
35 // GoVPP api package needs to be updated.
36 const _ = api.GoVppAPIPackageIsVersion2 // please upgrade the GoVPP api package
37
38 const (
39         // ModuleName is the name of this module.
40         ModuleName = "interface"
41         // APIVersion is the API version of this module.
42         APIVersion = "3.2.2"
43         // VersionCrc is the CRC of this module.
44         VersionCrc = 0xfebc3ffa
45 )
46
47 // AddressFamily represents VPP binary API enum 'address_family'.
48 type AddressFamily uint32
49
50 const (
51         ADDRESS_IP4 AddressFamily = 0
52         ADDRESS_IP6 AddressFamily = 1
53 )
54
55 var (
56         AddressFamily_name = map[uint32]string{
57                 0: "ADDRESS_IP4",
58                 1: "ADDRESS_IP6",
59         }
60         AddressFamily_value = map[string]uint32{
61                 "ADDRESS_IP4": 0,
62                 "ADDRESS_IP6": 1,
63         }
64 )
65
66 func (x AddressFamily) String() string {
67         s, ok := AddressFamily_name[uint32(x)]
68         if ok {
69                 return s
70         }
71         return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
72 }
73
74 // IfStatusFlags represents VPP binary API enum 'if_status_flags'.
75 type IfStatusFlags uint32
76
77 const (
78         IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
79         IF_STATUS_API_FLAG_LINK_UP  IfStatusFlags = 2
80 )
81
82 var (
83         IfStatusFlags_name = map[uint32]string{
84                 1: "IF_STATUS_API_FLAG_ADMIN_UP",
85                 2: "IF_STATUS_API_FLAG_LINK_UP",
86         }
87         IfStatusFlags_value = map[string]uint32{
88                 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
89                 "IF_STATUS_API_FLAG_LINK_UP":  2,
90         }
91 )
92
93 func (x IfStatusFlags) String() string {
94         s, ok := IfStatusFlags_name[uint32(x)]
95         if ok {
96                 return s
97         }
98         return "IfStatusFlags(" + strconv.Itoa(int(x)) + ")"
99 }
100
101 // IfType represents VPP binary API enum 'if_type'.
102 type IfType uint32
103
104 const (
105         IF_API_TYPE_HARDWARE IfType = 1
106         IF_API_TYPE_SUB      IfType = 2
107         IF_API_TYPE_P2P      IfType = 3
108         IF_API_TYPE_PIPE     IfType = 4
109 )
110
111 var (
112         IfType_name = map[uint32]string{
113                 1: "IF_API_TYPE_HARDWARE",
114                 2: "IF_API_TYPE_SUB",
115                 3: "IF_API_TYPE_P2P",
116                 4: "IF_API_TYPE_PIPE",
117         }
118         IfType_value = map[string]uint32{
119                 "IF_API_TYPE_HARDWARE": 1,
120                 "IF_API_TYPE_SUB":      2,
121                 "IF_API_TYPE_P2P":      3,
122                 "IF_API_TYPE_PIPE":     4,
123         }
124 )
125
126 func (x IfType) String() string {
127         s, ok := IfType_name[uint32(x)]
128         if ok {
129                 return s
130         }
131         return "IfType(" + strconv.Itoa(int(x)) + ")"
132 }
133
134 // IPDscp represents VPP binary API enum 'ip_dscp'.
135 type IPDscp uint8
136
137 const (
138         IP_API_DSCP_CS0  IPDscp = 0
139         IP_API_DSCP_CS1  IPDscp = 8
140         IP_API_DSCP_AF11 IPDscp = 10
141         IP_API_DSCP_AF12 IPDscp = 12
142         IP_API_DSCP_AF13 IPDscp = 14
143         IP_API_DSCP_CS2  IPDscp = 16
144         IP_API_DSCP_AF21 IPDscp = 18
145         IP_API_DSCP_AF22 IPDscp = 20
146         IP_API_DSCP_AF23 IPDscp = 22
147         IP_API_DSCP_CS3  IPDscp = 24
148         IP_API_DSCP_AF31 IPDscp = 26
149         IP_API_DSCP_AF32 IPDscp = 28
150         IP_API_DSCP_AF33 IPDscp = 30
151         IP_API_DSCP_CS4  IPDscp = 32
152         IP_API_DSCP_AF41 IPDscp = 34
153         IP_API_DSCP_AF42 IPDscp = 36
154         IP_API_DSCP_AF43 IPDscp = 38
155         IP_API_DSCP_CS5  IPDscp = 40
156         IP_API_DSCP_EF   IPDscp = 46
157         IP_API_DSCP_CS6  IPDscp = 48
158         IP_API_DSCP_CS7  IPDscp = 50
159 )
160
161 var (
162         IPDscp_name = map[uint8]string{
163                 0:  "IP_API_DSCP_CS0",
164                 8:  "IP_API_DSCP_CS1",
165                 10: "IP_API_DSCP_AF11",
166                 12: "IP_API_DSCP_AF12",
167                 14: "IP_API_DSCP_AF13",
168                 16: "IP_API_DSCP_CS2",
169                 18: "IP_API_DSCP_AF21",
170                 20: "IP_API_DSCP_AF22",
171                 22: "IP_API_DSCP_AF23",
172                 24: "IP_API_DSCP_CS3",
173                 26: "IP_API_DSCP_AF31",
174                 28: "IP_API_DSCP_AF32",
175                 30: "IP_API_DSCP_AF33",
176                 32: "IP_API_DSCP_CS4",
177                 34: "IP_API_DSCP_AF41",
178                 36: "IP_API_DSCP_AF42",
179                 38: "IP_API_DSCP_AF43",
180                 40: "IP_API_DSCP_CS5",
181                 46: "IP_API_DSCP_EF",
182                 48: "IP_API_DSCP_CS6",
183                 50: "IP_API_DSCP_CS7",
184         }
185         IPDscp_value = map[string]uint8{
186                 "IP_API_DSCP_CS0":  0,
187                 "IP_API_DSCP_CS1":  8,
188                 "IP_API_DSCP_AF11": 10,
189                 "IP_API_DSCP_AF12": 12,
190                 "IP_API_DSCP_AF13": 14,
191                 "IP_API_DSCP_CS2":  16,
192                 "IP_API_DSCP_AF21": 18,
193                 "IP_API_DSCP_AF22": 20,
194                 "IP_API_DSCP_AF23": 22,
195                 "IP_API_DSCP_CS3":  24,
196                 "IP_API_DSCP_AF31": 26,
197                 "IP_API_DSCP_AF32": 28,
198                 "IP_API_DSCP_AF33": 30,
199                 "IP_API_DSCP_CS4":  32,
200                 "IP_API_DSCP_AF41": 34,
201                 "IP_API_DSCP_AF42": 36,
202                 "IP_API_DSCP_AF43": 38,
203                 "IP_API_DSCP_CS5":  40,
204                 "IP_API_DSCP_EF":   46,
205                 "IP_API_DSCP_CS6":  48,
206                 "IP_API_DSCP_CS7":  50,
207         }
208 )
209
210 func (x IPDscp) String() string {
211         s, ok := IPDscp_name[uint8(x)]
212         if ok {
213                 return s
214         }
215         return "IPDscp(" + strconv.Itoa(int(x)) + ")"
216 }
217
218 // IPEcn represents VPP binary API enum 'ip_ecn'.
219 type IPEcn uint8
220
221 const (
222         IP_API_ECN_NONE IPEcn = 0
223         IP_API_ECN_ECT0 IPEcn = 1
224         IP_API_ECN_ECT1 IPEcn = 2
225         IP_API_ECN_CE   IPEcn = 3
226 )
227
228 var (
229         IPEcn_name = map[uint8]string{
230                 0: "IP_API_ECN_NONE",
231                 1: "IP_API_ECN_ECT0",
232                 2: "IP_API_ECN_ECT1",
233                 3: "IP_API_ECN_CE",
234         }
235         IPEcn_value = map[string]uint8{
236                 "IP_API_ECN_NONE": 0,
237                 "IP_API_ECN_ECT0": 1,
238                 "IP_API_ECN_ECT1": 2,
239                 "IP_API_ECN_CE":   3,
240         }
241 )
242
243 func (x IPEcn) String() string {
244         s, ok := IPEcn_name[uint8(x)]
245         if ok {
246                 return s
247         }
248         return "IPEcn(" + strconv.Itoa(int(x)) + ")"
249 }
250
251 // IPProto represents VPP binary API enum 'ip_proto'.
252 type IPProto uint32
253
254 const (
255         IP_API_PROTO_HOPOPT   IPProto = 0
256         IP_API_PROTO_ICMP     IPProto = 1
257         IP_API_PROTO_IGMP     IPProto = 2
258         IP_API_PROTO_TCP      IPProto = 6
259         IP_API_PROTO_UDP      IPProto = 17
260         IP_API_PROTO_GRE      IPProto = 47
261         IP_API_PROTO_AH       IPProto = 50
262         IP_API_PROTO_ESP      IPProto = 51
263         IP_API_PROTO_EIGRP    IPProto = 88
264         IP_API_PROTO_OSPF     IPProto = 89
265         IP_API_PROTO_SCTP     IPProto = 132
266         IP_API_PROTO_RESERVED IPProto = 255
267 )
268
269 var (
270         IPProto_name = map[uint32]string{
271                 0:   "IP_API_PROTO_HOPOPT",
272                 1:   "IP_API_PROTO_ICMP",
273                 2:   "IP_API_PROTO_IGMP",
274                 6:   "IP_API_PROTO_TCP",
275                 17:  "IP_API_PROTO_UDP",
276                 47:  "IP_API_PROTO_GRE",
277                 50:  "IP_API_PROTO_AH",
278                 51:  "IP_API_PROTO_ESP",
279                 88:  "IP_API_PROTO_EIGRP",
280                 89:  "IP_API_PROTO_OSPF",
281                 132: "IP_API_PROTO_SCTP",
282                 255: "IP_API_PROTO_RESERVED",
283         }
284         IPProto_value = map[string]uint32{
285                 "IP_API_PROTO_HOPOPT":   0,
286                 "IP_API_PROTO_ICMP":     1,
287                 "IP_API_PROTO_IGMP":     2,
288                 "IP_API_PROTO_TCP":      6,
289                 "IP_API_PROTO_UDP":      17,
290                 "IP_API_PROTO_GRE":      47,
291                 "IP_API_PROTO_AH":       50,
292                 "IP_API_PROTO_ESP":      51,
293                 "IP_API_PROTO_EIGRP":    88,
294                 "IP_API_PROTO_OSPF":     89,
295                 "IP_API_PROTO_SCTP":     132,
296                 "IP_API_PROTO_RESERVED": 255,
297         }
298 )
299
300 func (x IPProto) String() string {
301         s, ok := IPProto_name[uint32(x)]
302         if ok {
303                 return s
304         }
305         return "IPProto(" + strconv.Itoa(int(x)) + ")"
306 }
307
308 // LinkDuplex represents VPP binary API enum 'link_duplex'.
309 type LinkDuplex uint32
310
311 const (
312         LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
313         LINK_DUPLEX_API_HALF    LinkDuplex = 1
314         LINK_DUPLEX_API_FULL    LinkDuplex = 2
315 )
316
317 var (
318         LinkDuplex_name = map[uint32]string{
319                 0: "LINK_DUPLEX_API_UNKNOWN",
320                 1: "LINK_DUPLEX_API_HALF",
321                 2: "LINK_DUPLEX_API_FULL",
322         }
323         LinkDuplex_value = map[string]uint32{
324                 "LINK_DUPLEX_API_UNKNOWN": 0,
325                 "LINK_DUPLEX_API_HALF":    1,
326                 "LINK_DUPLEX_API_FULL":    2,
327         }
328 )
329
330 func (x LinkDuplex) String() string {
331         s, ok := LinkDuplex_name[uint32(x)]
332         if ok {
333                 return s
334         }
335         return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
336 }
337
338 // MtuProto represents VPP binary API enum 'mtu_proto'.
339 type MtuProto uint32
340
341 const (
342         MTU_PROTO_API_L3   MtuProto = 1
343         MTU_PROTO_API_IP4  MtuProto = 2
344         MTU_PROTO_API_IP6  MtuProto = 3
345         MTU_PROTO_API_MPLS MtuProto = 4
346         MTU_PROTO_API_N    MtuProto = 5
347 )
348
349 var (
350         MtuProto_name = map[uint32]string{
351                 1: "MTU_PROTO_API_L3",
352                 2: "MTU_PROTO_API_IP4",
353                 3: "MTU_PROTO_API_IP6",
354                 4: "MTU_PROTO_API_MPLS",
355                 5: "MTU_PROTO_API_N",
356         }
357         MtuProto_value = map[string]uint32{
358                 "MTU_PROTO_API_L3":   1,
359                 "MTU_PROTO_API_IP4":  2,
360                 "MTU_PROTO_API_IP6":  3,
361                 "MTU_PROTO_API_MPLS": 4,
362                 "MTU_PROTO_API_N":    5,
363         }
364 )
365
366 func (x MtuProto) String() string {
367         s, ok := MtuProto_name[uint32(x)]
368         if ok {
369                 return s
370         }
371         return "MtuProto(" + strconv.Itoa(int(x)) + ")"
372 }
373
374 // RxMode represents VPP binary API enum 'rx_mode'.
375 type RxMode uint32
376
377 const (
378         RX_MODE_API_UNKNOWN   RxMode = 0
379         RX_MODE_API_POLLING   RxMode = 1
380         RX_MODE_API_INTERRUPT RxMode = 2
381         RX_MODE_API_ADAPTIVE  RxMode = 3
382         RX_MODE_API_DEFAULT   RxMode = 4
383 )
384
385 var (
386         RxMode_name = map[uint32]string{
387                 0: "RX_MODE_API_UNKNOWN",
388                 1: "RX_MODE_API_POLLING",
389                 2: "RX_MODE_API_INTERRUPT",
390                 3: "RX_MODE_API_ADAPTIVE",
391                 4: "RX_MODE_API_DEFAULT",
392         }
393         RxMode_value = map[string]uint32{
394                 "RX_MODE_API_UNKNOWN":   0,
395                 "RX_MODE_API_POLLING":   1,
396                 "RX_MODE_API_INTERRUPT": 2,
397                 "RX_MODE_API_ADAPTIVE":  3,
398                 "RX_MODE_API_DEFAULT":   4,
399         }
400 )
401
402 func (x RxMode) String() string {
403         s, ok := RxMode_name[uint32(x)]
404         if ok {
405                 return s
406         }
407         return "RxMode(" + strconv.Itoa(int(x)) + ")"
408 }
409
410 // SubIfFlags represents VPP binary API enum 'sub_if_flags'.
411 type SubIfFlags uint32
412
413 const (
414         SUB_IF_API_FLAG_NO_TAGS           SubIfFlags = 1
415         SUB_IF_API_FLAG_ONE_TAG           SubIfFlags = 2
416         SUB_IF_API_FLAG_TWO_TAGS          SubIfFlags = 4
417         SUB_IF_API_FLAG_DOT1AD            SubIfFlags = 8
418         SUB_IF_API_FLAG_EXACT_MATCH       SubIfFlags = 16
419         SUB_IF_API_FLAG_DEFAULT           SubIfFlags = 32
420         SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
421         SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
422         SUB_IF_API_FLAG_MASK_VNET         SubIfFlags = 254
423         SUB_IF_API_FLAG_DOT1AH            SubIfFlags = 256
424 )
425
426 var (
427         SubIfFlags_name = map[uint32]string{
428                 1:   "SUB_IF_API_FLAG_NO_TAGS",
429                 2:   "SUB_IF_API_FLAG_ONE_TAG",
430                 4:   "SUB_IF_API_FLAG_TWO_TAGS",
431                 8:   "SUB_IF_API_FLAG_DOT1AD",
432                 16:  "SUB_IF_API_FLAG_EXACT_MATCH",
433                 32:  "SUB_IF_API_FLAG_DEFAULT",
434                 64:  "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
435                 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
436                 254: "SUB_IF_API_FLAG_MASK_VNET",
437                 256: "SUB_IF_API_FLAG_DOT1AH",
438         }
439         SubIfFlags_value = map[string]uint32{
440                 "SUB_IF_API_FLAG_NO_TAGS":           1,
441                 "SUB_IF_API_FLAG_ONE_TAG":           2,
442                 "SUB_IF_API_FLAG_TWO_TAGS":          4,
443                 "SUB_IF_API_FLAG_DOT1AD":            8,
444                 "SUB_IF_API_FLAG_EXACT_MATCH":       16,
445                 "SUB_IF_API_FLAG_DEFAULT":           32,
446                 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
447                 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
448                 "SUB_IF_API_FLAG_MASK_VNET":         254,
449                 "SUB_IF_API_FLAG_DOT1AH":            256,
450         }
451 )
452
453 func (x SubIfFlags) String() string {
454         s, ok := SubIfFlags_name[uint32(x)]
455         if ok {
456                 return s
457         }
458         return "SubIfFlags(" + strconv.Itoa(int(x)) + ")"
459 }
460
461 // AddressWithPrefix represents VPP binary API alias 'address_with_prefix'.
462 type AddressWithPrefix Prefix
463
464 // InterfaceIndex represents VPP binary API alias 'interface_index'.
465 type InterfaceIndex uint32
466
467 // IP4Address represents VPP binary API alias 'ip4_address'.
468 type IP4Address [4]uint8
469
470 // IP4AddressWithPrefix represents VPP binary API alias 'ip4_address_with_prefix'.
471 type IP4AddressWithPrefix IP4Prefix
472
473 // IP6Address represents VPP binary API alias 'ip6_address'.
474 type IP6Address [16]uint8
475
476 // IP6AddressWithPrefix represents VPP binary API alias 'ip6_address_with_prefix'.
477 type IP6AddressWithPrefix IP6Prefix
478
479 // MacAddress represents VPP binary API alias 'mac_address'.
480 type MacAddress [6]uint8
481
482 // Address represents VPP binary API type 'address'.
483 type Address struct {
484         Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
485         Un AddressUnion  `binapi:"address_union,name=un" json:"un,omitempty"`
486 }
487
488 func (*Address) GetTypeName() string { return "address" }
489
490 // IP4Prefix represents VPP binary API type 'ip4_prefix'.
491 type IP4Prefix struct {
492         Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
493         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
494 }
495
496 func (*IP4Prefix) GetTypeName() string { return "ip4_prefix" }
497
498 // IP6Prefix represents VPP binary API type 'ip6_prefix'.
499 type IP6Prefix struct {
500         Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
501         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
502 }
503
504 func (*IP6Prefix) GetTypeName() string { return "ip6_prefix" }
505
506 // Mprefix represents VPP binary API type 'mprefix'.
507 type Mprefix struct {
508         Af               AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
509         GrpAddressLength uint16        `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
510         GrpAddress       AddressUnion  `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
511         SrcAddress       AddressUnion  `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
512 }
513
514 func (*Mprefix) GetTypeName() string { return "mprefix" }
515
516 // Prefix represents VPP binary API type 'prefix'.
517 type Prefix struct {
518         Address Address `binapi:"address,name=address" json:"address,omitempty"`
519         Len     uint8   `binapi:"u8,name=len" json:"len,omitempty"`
520 }
521
522 func (*Prefix) GetTypeName() string { return "prefix" }
523
524 // PrefixMatcher represents VPP binary API type 'prefix_matcher'.
525 type PrefixMatcher struct {
526         Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
527         Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
528 }
529
530 func (*PrefixMatcher) GetTypeName() string { return "prefix_matcher" }
531
532 // AddressUnion represents VPP binary API union 'address_union'.
533 type AddressUnion struct {
534         XXX_UnionData [16]byte
535 }
536
537 func (*AddressUnion) GetTypeName() string { return "address_union" }
538
539 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
540         u.SetIP4(a)
541         return
542 }
543 func (u *AddressUnion) SetIP4(a IP4Address) {
544         var b = new(bytes.Buffer)
545         if err := struc.Pack(b, &a); err != nil {
546                 return
547         }
548         copy(u.XXX_UnionData[:], b.Bytes())
549 }
550 func (u *AddressUnion) GetIP4() (a IP4Address) {
551         var b = bytes.NewReader(u.XXX_UnionData[:])
552         struc.Unpack(b, &a)
553         return
554 }
555
556 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
557         u.SetIP6(a)
558         return
559 }
560 func (u *AddressUnion) SetIP6(a IP6Address) {
561         var b = new(bytes.Buffer)
562         if err := struc.Pack(b, &a); err != nil {
563                 return
564         }
565         copy(u.XXX_UnionData[:], b.Bytes())
566 }
567 func (u *AddressUnion) GetIP6() (a IP6Address) {
568         var b = bytes.NewReader(u.XXX_UnionData[:])
569         struc.Unpack(b, &a)
570         return
571 }
572
573 // CollectDetailedInterfaceStats represents VPP binary API message 'collect_detailed_interface_stats'.
574 type CollectDetailedInterfaceStats struct {
575         SwIfIndex     InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
576         EnableDisable bool           `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
577 }
578
579 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
580 func (*CollectDetailedInterfaceStats) GetMessageName() string {
581         return "collect_detailed_interface_stats"
582 }
583 func (*CollectDetailedInterfaceStats) GetCrcString() string            { return "5501adee" }
584 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { return api.RequestMessage }
585
586 func (m *CollectDetailedInterfaceStats) Size() int {
587         if m == nil {
588                 return 0
589         }
590         var size int
591         // field[1] m.SwIfIndex
592         size += 4
593         // field[1] m.EnableDisable
594         size += 1
595         return size
596 }
597 func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
598         o := binary.BigEndian
599         _ = o
600         pos := 0
601         _ = pos
602         var buf []byte
603         if b == nil {
604                 buf = make([]byte, m.Size())
605         } else {
606                 buf = b
607         }
608         // field[1] m.SwIfIndex
609         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
610         pos += 4
611         // field[1] m.EnableDisable
612         if m.EnableDisable {
613                 buf[pos] = 1
614         }
615         pos += 1
616         return buf, nil
617 }
618 func (m *CollectDetailedInterfaceStats) Unmarshal(tmp []byte) error {
619         o := binary.BigEndian
620         _ = o
621         pos := 0
622         _ = pos
623         // field[1] m.SwIfIndex
624         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
625         pos += 4
626         // field[1] m.EnableDisable
627         m.EnableDisable = tmp[pos] != 0
628         pos += 1
629         return nil
630 }
631
632 // CollectDetailedInterfaceStatsReply represents VPP binary API message 'collect_detailed_interface_stats_reply'.
633 type CollectDetailedInterfaceStatsReply struct {
634         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
635 }
636
637 func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
638 func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
639         return "collect_detailed_interface_stats_reply"
640 }
641 func (*CollectDetailedInterfaceStatsReply) GetCrcString() string            { return "e8d4e804" }
642 func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
643
644 func (m *CollectDetailedInterfaceStatsReply) Size() int {
645         if m == nil {
646                 return 0
647         }
648         var size int
649         // field[1] m.Retval
650         size += 4
651         return size
652 }
653 func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) {
654         o := binary.BigEndian
655         _ = o
656         pos := 0
657         _ = pos
658         var buf []byte
659         if b == nil {
660                 buf = make([]byte, m.Size())
661         } else {
662                 buf = b
663         }
664         // field[1] m.Retval
665         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
666         pos += 4
667         return buf, nil
668 }
669 func (m *CollectDetailedInterfaceStatsReply) Unmarshal(tmp []byte) error {
670         o := binary.BigEndian
671         _ = o
672         pos := 0
673         _ = pos
674         // field[1] m.Retval
675         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
676         pos += 4
677         return nil
678 }
679
680 // CreateLoopback represents VPP binary API message 'create_loopback'.
681 type CreateLoopback struct {
682         MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
683 }
684
685 func (m *CreateLoopback) Reset()                        { *m = CreateLoopback{} }
686 func (*CreateLoopback) GetMessageName() string          { return "create_loopback" }
687 func (*CreateLoopback) GetCrcString() string            { return "42bb5d22" }
688 func (*CreateLoopback) GetMessageType() api.MessageType { return api.RequestMessage }
689
690 func (m *CreateLoopback) Size() int {
691         if m == nil {
692                 return 0
693         }
694         var size int
695         // field[1] m.MacAddress
696         size += 6
697         return size
698 }
699 func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
700         o := binary.BigEndian
701         _ = o
702         pos := 0
703         _ = pos
704         var buf []byte
705         if b == nil {
706                 buf = make([]byte, m.Size())
707         } else {
708                 buf = b
709         }
710         // field[1] m.MacAddress
711         for i := 0; i < 6; i++ {
712                 var x uint8
713                 if i < len(m.MacAddress) {
714                         x = uint8(m.MacAddress[i])
715                 }
716                 buf[pos] = uint8(x)
717                 pos += 1
718         }
719         return buf, nil
720 }
721 func (m *CreateLoopback) Unmarshal(tmp []byte) error {
722         o := binary.BigEndian
723         _ = o
724         pos := 0
725         _ = pos
726         // field[1] m.MacAddress
727         for i := 0; i < len(m.MacAddress); i++ {
728                 m.MacAddress[i] = uint8(tmp[pos])
729                 pos += 1
730         }
731         return nil
732 }
733
734 // CreateLoopbackInstance represents VPP binary API message 'create_loopback_instance'.
735 type CreateLoopbackInstance struct {
736         MacAddress   MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
737         IsSpecified  bool       `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
738         UserInstance uint32     `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
739 }
740
741 func (m *CreateLoopbackInstance) Reset()                        { *m = CreateLoopbackInstance{} }
742 func (*CreateLoopbackInstance) GetMessageName() string          { return "create_loopback_instance" }
743 func (*CreateLoopbackInstance) GetCrcString() string            { return "d36a3ee2" }
744 func (*CreateLoopbackInstance) GetMessageType() api.MessageType { return api.RequestMessage }
745
746 func (m *CreateLoopbackInstance) Size() int {
747         if m == nil {
748                 return 0
749         }
750         var size int
751         // field[1] m.MacAddress
752         size += 6
753         // field[1] m.IsSpecified
754         size += 1
755         // field[1] m.UserInstance
756         size += 4
757         return size
758 }
759 func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
760         o := binary.BigEndian
761         _ = o
762         pos := 0
763         _ = pos
764         var buf []byte
765         if b == nil {
766                 buf = make([]byte, m.Size())
767         } else {
768                 buf = b
769         }
770         // field[1] m.MacAddress
771         for i := 0; i < 6; i++ {
772                 var x uint8
773                 if i < len(m.MacAddress) {
774                         x = uint8(m.MacAddress[i])
775                 }
776                 buf[pos] = uint8(x)
777                 pos += 1
778         }
779         // field[1] m.IsSpecified
780         if m.IsSpecified {
781                 buf[pos] = 1
782         }
783         pos += 1
784         // field[1] m.UserInstance
785         o.PutUint32(buf[pos:pos+4], uint32(m.UserInstance))
786         pos += 4
787         return buf, nil
788 }
789 func (m *CreateLoopbackInstance) Unmarshal(tmp []byte) error {
790         o := binary.BigEndian
791         _ = o
792         pos := 0
793         _ = pos
794         // field[1] m.MacAddress
795         for i := 0; i < len(m.MacAddress); i++ {
796                 m.MacAddress[i] = uint8(tmp[pos])
797                 pos += 1
798         }
799         // field[1] m.IsSpecified
800         m.IsSpecified = tmp[pos] != 0
801         pos += 1
802         // field[1] m.UserInstance
803         m.UserInstance = uint32(o.Uint32(tmp[pos : pos+4]))
804         pos += 4
805         return nil
806 }
807
808 // CreateLoopbackInstanceReply represents VPP binary API message 'create_loopback_instance_reply'.
809 type CreateLoopbackInstanceReply struct {
810         Retval    int32          `binapi:"i32,name=retval" json:"retval,omitempty"`
811         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
812 }
813
814 func (m *CreateLoopbackInstanceReply) Reset()                        { *m = CreateLoopbackInstanceReply{} }
815 func (*CreateLoopbackInstanceReply) GetMessageName() string          { return "create_loopback_instance_reply" }
816 func (*CreateLoopbackInstanceReply) GetCrcString() string            { return "5383d31f" }
817 func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { return api.ReplyMessage }
818
819 func (m *CreateLoopbackInstanceReply) Size() int {
820         if m == nil {
821                 return 0
822         }
823         var size int
824         // field[1] m.Retval
825         size += 4
826         // field[1] m.SwIfIndex
827         size += 4
828         return size
829 }
830 func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) {
831         o := binary.BigEndian
832         _ = o
833         pos := 0
834         _ = pos
835         var buf []byte
836         if b == nil {
837                 buf = make([]byte, m.Size())
838         } else {
839                 buf = b
840         }
841         // field[1] m.Retval
842         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
843         pos += 4
844         // field[1] m.SwIfIndex
845         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
846         pos += 4
847         return buf, nil
848 }
849 func (m *CreateLoopbackInstanceReply) Unmarshal(tmp []byte) error {
850         o := binary.BigEndian
851         _ = o
852         pos := 0
853         _ = pos
854         // field[1] m.Retval
855         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
856         pos += 4
857         // field[1] m.SwIfIndex
858         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
859         pos += 4
860         return nil
861 }
862
863 // CreateLoopbackReply represents VPP binary API message 'create_loopback_reply'.
864 type CreateLoopbackReply struct {
865         Retval    int32          `binapi:"i32,name=retval" json:"retval,omitempty"`
866         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
867 }
868
869 func (m *CreateLoopbackReply) Reset()                        { *m = CreateLoopbackReply{} }
870 func (*CreateLoopbackReply) GetMessageName() string          { return "create_loopback_reply" }
871 func (*CreateLoopbackReply) GetCrcString() string            { return "5383d31f" }
872 func (*CreateLoopbackReply) GetMessageType() api.MessageType { return api.ReplyMessage }
873
874 func (m *CreateLoopbackReply) Size() int {
875         if m == nil {
876                 return 0
877         }
878         var size int
879         // field[1] m.Retval
880         size += 4
881         // field[1] m.SwIfIndex
882         size += 4
883         return size
884 }
885 func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) {
886         o := binary.BigEndian
887         _ = o
888         pos := 0
889         _ = pos
890         var buf []byte
891         if b == nil {
892                 buf = make([]byte, m.Size())
893         } else {
894                 buf = b
895         }
896         // field[1] m.Retval
897         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
898         pos += 4
899         // field[1] m.SwIfIndex
900         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
901         pos += 4
902         return buf, nil
903 }
904 func (m *CreateLoopbackReply) Unmarshal(tmp []byte) error {
905         o := binary.BigEndian
906         _ = o
907         pos := 0
908         _ = pos
909         // field[1] m.Retval
910         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
911         pos += 4
912         // field[1] m.SwIfIndex
913         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
914         pos += 4
915         return nil
916 }
917
918 // CreateSubif represents VPP binary API message 'create_subif'.
919 type CreateSubif struct {
920         SwIfIndex   InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
921         SubID       uint32         `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
922         SubIfFlags  SubIfFlags     `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
923         OuterVlanID uint16         `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
924         InnerVlanID uint16         `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
925 }
926
927 func (m *CreateSubif) Reset()                        { *m = CreateSubif{} }
928 func (*CreateSubif) GetMessageName() string          { return "create_subif" }
929 func (*CreateSubif) GetCrcString() string            { return "cb371063" }
930 func (*CreateSubif) GetMessageType() api.MessageType { return api.RequestMessage }
931
932 func (m *CreateSubif) Size() int {
933         if m == nil {
934                 return 0
935         }
936         var size int
937         // field[1] m.SwIfIndex
938         size += 4
939         // field[1] m.SubID
940         size += 4
941         // field[1] m.SubIfFlags
942         size += 4
943         // field[1] m.OuterVlanID
944         size += 2
945         // field[1] m.InnerVlanID
946         size += 2
947         return size
948 }
949 func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
950         o := binary.BigEndian
951         _ = o
952         pos := 0
953         _ = pos
954         var buf []byte
955         if b == nil {
956                 buf = make([]byte, m.Size())
957         } else {
958                 buf = b
959         }
960         // field[1] m.SwIfIndex
961         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
962         pos += 4
963         // field[1] m.SubID
964         o.PutUint32(buf[pos:pos+4], uint32(m.SubID))
965         pos += 4
966         // field[1] m.SubIfFlags
967         o.PutUint32(buf[pos:pos+4], uint32(m.SubIfFlags))
968         pos += 4
969         // field[1] m.OuterVlanID
970         o.PutUint16(buf[pos:pos+2], uint16(m.OuterVlanID))
971         pos += 2
972         // field[1] m.InnerVlanID
973         o.PutUint16(buf[pos:pos+2], uint16(m.InnerVlanID))
974         pos += 2
975         return buf, nil
976 }
977 func (m *CreateSubif) Unmarshal(tmp []byte) error {
978         o := binary.BigEndian
979         _ = o
980         pos := 0
981         _ = pos
982         // field[1] m.SwIfIndex
983         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
984         pos += 4
985         // field[1] m.SubID
986         m.SubID = uint32(o.Uint32(tmp[pos : pos+4]))
987         pos += 4
988         // field[1] m.SubIfFlags
989         m.SubIfFlags = SubIfFlags(o.Uint32(tmp[pos : pos+4]))
990         pos += 4
991         // field[1] m.OuterVlanID
992         m.OuterVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
993         pos += 2
994         // field[1] m.InnerVlanID
995         m.InnerVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
996         pos += 2
997         return nil
998 }
999
1000 // CreateSubifReply represents VPP binary API message 'create_subif_reply'.
1001 type CreateSubifReply struct {
1002         Retval    int32          `binapi:"i32,name=retval" json:"retval,omitempty"`
1003         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1004 }
1005
1006 func (m *CreateSubifReply) Reset()                        { *m = CreateSubifReply{} }
1007 func (*CreateSubifReply) GetMessageName() string          { return "create_subif_reply" }
1008 func (*CreateSubifReply) GetCrcString() string            { return "5383d31f" }
1009 func (*CreateSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1010
1011 func (m *CreateSubifReply) Size() int {
1012         if m == nil {
1013                 return 0
1014         }
1015         var size int
1016         // field[1] m.Retval
1017         size += 4
1018         // field[1] m.SwIfIndex
1019         size += 4
1020         return size
1021 }
1022 func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) {
1023         o := binary.BigEndian
1024         _ = o
1025         pos := 0
1026         _ = pos
1027         var buf []byte
1028         if b == nil {
1029                 buf = make([]byte, m.Size())
1030         } else {
1031                 buf = b
1032         }
1033         // field[1] m.Retval
1034         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1035         pos += 4
1036         // field[1] m.SwIfIndex
1037         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1038         pos += 4
1039         return buf, nil
1040 }
1041 func (m *CreateSubifReply) Unmarshal(tmp []byte) error {
1042         o := binary.BigEndian
1043         _ = o
1044         pos := 0
1045         _ = pos
1046         // field[1] m.Retval
1047         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1048         pos += 4
1049         // field[1] m.SwIfIndex
1050         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1051         pos += 4
1052         return nil
1053 }
1054
1055 // CreateVlanSubif represents VPP binary API message 'create_vlan_subif'.
1056 type CreateVlanSubif struct {
1057         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1058         VlanID    uint32         `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
1059 }
1060
1061 func (m *CreateVlanSubif) Reset()                        { *m = CreateVlanSubif{} }
1062 func (*CreateVlanSubif) GetMessageName() string          { return "create_vlan_subif" }
1063 func (*CreateVlanSubif) GetCrcString() string            { return "af34ac8b" }
1064 func (*CreateVlanSubif) GetMessageType() api.MessageType { return api.RequestMessage }
1065
1066 func (m *CreateVlanSubif) Size() int {
1067         if m == nil {
1068                 return 0
1069         }
1070         var size int
1071         // field[1] m.SwIfIndex
1072         size += 4
1073         // field[1] m.VlanID
1074         size += 4
1075         return size
1076 }
1077 func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
1078         o := binary.BigEndian
1079         _ = o
1080         pos := 0
1081         _ = pos
1082         var buf []byte
1083         if b == nil {
1084                 buf = make([]byte, m.Size())
1085         } else {
1086                 buf = b
1087         }
1088         // field[1] m.SwIfIndex
1089         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1090         pos += 4
1091         // field[1] m.VlanID
1092         o.PutUint32(buf[pos:pos+4], uint32(m.VlanID))
1093         pos += 4
1094         return buf, nil
1095 }
1096 func (m *CreateVlanSubif) Unmarshal(tmp []byte) error {
1097         o := binary.BigEndian
1098         _ = o
1099         pos := 0
1100         _ = pos
1101         // field[1] m.SwIfIndex
1102         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1103         pos += 4
1104         // field[1] m.VlanID
1105         m.VlanID = uint32(o.Uint32(tmp[pos : pos+4]))
1106         pos += 4
1107         return nil
1108 }
1109
1110 // CreateVlanSubifReply represents VPP binary API message 'create_vlan_subif_reply'.
1111 type CreateVlanSubifReply struct {
1112         Retval    int32          `binapi:"i32,name=retval" json:"retval,omitempty"`
1113         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1114 }
1115
1116 func (m *CreateVlanSubifReply) Reset()                        { *m = CreateVlanSubifReply{} }
1117 func (*CreateVlanSubifReply) GetMessageName() string          { return "create_vlan_subif_reply" }
1118 func (*CreateVlanSubifReply) GetCrcString() string            { return "5383d31f" }
1119 func (*CreateVlanSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1120
1121 func (m *CreateVlanSubifReply) Size() int {
1122         if m == nil {
1123                 return 0
1124         }
1125         var size int
1126         // field[1] m.Retval
1127         size += 4
1128         // field[1] m.SwIfIndex
1129         size += 4
1130         return size
1131 }
1132 func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) {
1133         o := binary.BigEndian
1134         _ = o
1135         pos := 0
1136         _ = pos
1137         var buf []byte
1138         if b == nil {
1139                 buf = make([]byte, m.Size())
1140         } else {
1141                 buf = b
1142         }
1143         // field[1] m.Retval
1144         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1145         pos += 4
1146         // field[1] m.SwIfIndex
1147         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1148         pos += 4
1149         return buf, nil
1150 }
1151 func (m *CreateVlanSubifReply) Unmarshal(tmp []byte) error {
1152         o := binary.BigEndian
1153         _ = o
1154         pos := 0
1155         _ = pos
1156         // field[1] m.Retval
1157         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1158         pos += 4
1159         // field[1] m.SwIfIndex
1160         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1161         pos += 4
1162         return nil
1163 }
1164
1165 // DeleteLoopback represents VPP binary API message 'delete_loopback'.
1166 type DeleteLoopback struct {
1167         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1168 }
1169
1170 func (m *DeleteLoopback) Reset()                        { *m = DeleteLoopback{} }
1171 func (*DeleteLoopback) GetMessageName() string          { return "delete_loopback" }
1172 func (*DeleteLoopback) GetCrcString() string            { return "f9e6675e" }
1173 func (*DeleteLoopback) GetMessageType() api.MessageType { return api.RequestMessage }
1174
1175 func (m *DeleteLoopback) Size() int {
1176         if m == nil {
1177                 return 0
1178         }
1179         var size int
1180         // field[1] m.SwIfIndex
1181         size += 4
1182         return size
1183 }
1184 func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) {
1185         o := binary.BigEndian
1186         _ = o
1187         pos := 0
1188         _ = pos
1189         var buf []byte
1190         if b == nil {
1191                 buf = make([]byte, m.Size())
1192         } else {
1193                 buf = b
1194         }
1195         // field[1] m.SwIfIndex
1196         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1197         pos += 4
1198         return buf, nil
1199 }
1200 func (m *DeleteLoopback) Unmarshal(tmp []byte) error {
1201         o := binary.BigEndian
1202         _ = o
1203         pos := 0
1204         _ = pos
1205         // field[1] m.SwIfIndex
1206         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1207         pos += 4
1208         return nil
1209 }
1210
1211 // DeleteLoopbackReply represents VPP binary API message 'delete_loopback_reply'.
1212 type DeleteLoopbackReply struct {
1213         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1214 }
1215
1216 func (m *DeleteLoopbackReply) Reset()                        { *m = DeleteLoopbackReply{} }
1217 func (*DeleteLoopbackReply) GetMessageName() string          { return "delete_loopback_reply" }
1218 func (*DeleteLoopbackReply) GetCrcString() string            { return "e8d4e804" }
1219 func (*DeleteLoopbackReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1220
1221 func (m *DeleteLoopbackReply) Size() int {
1222         if m == nil {
1223                 return 0
1224         }
1225         var size int
1226         // field[1] m.Retval
1227         size += 4
1228         return size
1229 }
1230 func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) {
1231         o := binary.BigEndian
1232         _ = o
1233         pos := 0
1234         _ = pos
1235         var buf []byte
1236         if b == nil {
1237                 buf = make([]byte, m.Size())
1238         } else {
1239                 buf = b
1240         }
1241         // field[1] m.Retval
1242         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1243         pos += 4
1244         return buf, nil
1245 }
1246 func (m *DeleteLoopbackReply) Unmarshal(tmp []byte) error {
1247         o := binary.BigEndian
1248         _ = o
1249         pos := 0
1250         _ = pos
1251         // field[1] m.Retval
1252         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1253         pos += 4
1254         return nil
1255 }
1256
1257 // DeleteSubif represents VPP binary API message 'delete_subif'.
1258 type DeleteSubif struct {
1259         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1260 }
1261
1262 func (m *DeleteSubif) Reset()                        { *m = DeleteSubif{} }
1263 func (*DeleteSubif) GetMessageName() string          { return "delete_subif" }
1264 func (*DeleteSubif) GetCrcString() string            { return "f9e6675e" }
1265 func (*DeleteSubif) GetMessageType() api.MessageType { return api.RequestMessage }
1266
1267 func (m *DeleteSubif) Size() int {
1268         if m == nil {
1269                 return 0
1270         }
1271         var size int
1272         // field[1] m.SwIfIndex
1273         size += 4
1274         return size
1275 }
1276 func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) {
1277         o := binary.BigEndian
1278         _ = o
1279         pos := 0
1280         _ = pos
1281         var buf []byte
1282         if b == nil {
1283                 buf = make([]byte, m.Size())
1284         } else {
1285                 buf = b
1286         }
1287         // field[1] m.SwIfIndex
1288         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1289         pos += 4
1290         return buf, nil
1291 }
1292 func (m *DeleteSubif) Unmarshal(tmp []byte) error {
1293         o := binary.BigEndian
1294         _ = o
1295         pos := 0
1296         _ = pos
1297         // field[1] m.SwIfIndex
1298         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1299         pos += 4
1300         return nil
1301 }
1302
1303 // DeleteSubifReply represents VPP binary API message 'delete_subif_reply'.
1304 type DeleteSubifReply struct {
1305         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1306 }
1307
1308 func (m *DeleteSubifReply) Reset()                        { *m = DeleteSubifReply{} }
1309 func (*DeleteSubifReply) GetMessageName() string          { return "delete_subif_reply" }
1310 func (*DeleteSubifReply) GetCrcString() string            { return "e8d4e804" }
1311 func (*DeleteSubifReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1312
1313 func (m *DeleteSubifReply) Size() int {
1314         if m == nil {
1315                 return 0
1316         }
1317         var size int
1318         // field[1] m.Retval
1319         size += 4
1320         return size
1321 }
1322 func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) {
1323         o := binary.BigEndian
1324         _ = o
1325         pos := 0
1326         _ = pos
1327         var buf []byte
1328         if b == nil {
1329                 buf = make([]byte, m.Size())
1330         } else {
1331                 buf = b
1332         }
1333         // field[1] m.Retval
1334         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1335         pos += 4
1336         return buf, nil
1337 }
1338 func (m *DeleteSubifReply) Unmarshal(tmp []byte) error {
1339         o := binary.BigEndian
1340         _ = o
1341         pos := 0
1342         _ = pos
1343         // field[1] m.Retval
1344         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1345         pos += 4
1346         return nil
1347 }
1348
1349 // HwInterfaceSetMtu represents VPP binary API message 'hw_interface_set_mtu'.
1350 type HwInterfaceSetMtu struct {
1351         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1352         Mtu       uint16         `binapi:"u16,name=mtu" json:"mtu,omitempty"`
1353 }
1354
1355 func (m *HwInterfaceSetMtu) Reset()                        { *m = HwInterfaceSetMtu{} }
1356 func (*HwInterfaceSetMtu) GetMessageName() string          { return "hw_interface_set_mtu" }
1357 func (*HwInterfaceSetMtu) GetCrcString() string            { return "e6746899" }
1358 func (*HwInterfaceSetMtu) GetMessageType() api.MessageType { return api.RequestMessage }
1359
1360 func (m *HwInterfaceSetMtu) Size() int {
1361         if m == nil {
1362                 return 0
1363         }
1364         var size int
1365         // field[1] m.SwIfIndex
1366         size += 4
1367         // field[1] m.Mtu
1368         size += 2
1369         return size
1370 }
1371 func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
1372         o := binary.BigEndian
1373         _ = o
1374         pos := 0
1375         _ = pos
1376         var buf []byte
1377         if b == nil {
1378                 buf = make([]byte, m.Size())
1379         } else {
1380                 buf = b
1381         }
1382         // field[1] m.SwIfIndex
1383         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1384         pos += 4
1385         // field[1] m.Mtu
1386         o.PutUint16(buf[pos:pos+2], uint16(m.Mtu))
1387         pos += 2
1388         return buf, nil
1389 }
1390 func (m *HwInterfaceSetMtu) Unmarshal(tmp []byte) error {
1391         o := binary.BigEndian
1392         _ = o
1393         pos := 0
1394         _ = pos
1395         // field[1] m.SwIfIndex
1396         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1397         pos += 4
1398         // field[1] m.Mtu
1399         m.Mtu = uint16(o.Uint16(tmp[pos : pos+2]))
1400         pos += 2
1401         return nil
1402 }
1403
1404 // HwInterfaceSetMtuReply represents VPP binary API message 'hw_interface_set_mtu_reply'.
1405 type HwInterfaceSetMtuReply struct {
1406         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1407 }
1408
1409 func (m *HwInterfaceSetMtuReply) Reset()                        { *m = HwInterfaceSetMtuReply{} }
1410 func (*HwInterfaceSetMtuReply) GetMessageName() string          { return "hw_interface_set_mtu_reply" }
1411 func (*HwInterfaceSetMtuReply) GetCrcString() string            { return "e8d4e804" }
1412 func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1413
1414 func (m *HwInterfaceSetMtuReply) Size() int {
1415         if m == nil {
1416                 return 0
1417         }
1418         var size int
1419         // field[1] m.Retval
1420         size += 4
1421         return size
1422 }
1423 func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
1424         o := binary.BigEndian
1425         _ = o
1426         pos := 0
1427         _ = pos
1428         var buf []byte
1429         if b == nil {
1430                 buf = make([]byte, m.Size())
1431         } else {
1432                 buf = b
1433         }
1434         // field[1] m.Retval
1435         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1436         pos += 4
1437         return buf, nil
1438 }
1439 func (m *HwInterfaceSetMtuReply) Unmarshal(tmp []byte) error {
1440         o := binary.BigEndian
1441         _ = o
1442         pos := 0
1443         _ = pos
1444         // field[1] m.Retval
1445         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1446         pos += 4
1447         return nil
1448 }
1449
1450 // InterfaceNameRenumber represents VPP binary API message 'interface_name_renumber'.
1451 type InterfaceNameRenumber struct {
1452         SwIfIndex          InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1453         NewShowDevInstance uint32         `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
1454 }
1455
1456 func (m *InterfaceNameRenumber) Reset()                        { *m = InterfaceNameRenumber{} }
1457 func (*InterfaceNameRenumber) GetMessageName() string          { return "interface_name_renumber" }
1458 func (*InterfaceNameRenumber) GetCrcString() string            { return "2b8858b8" }
1459 func (*InterfaceNameRenumber) GetMessageType() api.MessageType { return api.RequestMessage }
1460
1461 func (m *InterfaceNameRenumber) Size() int {
1462         if m == nil {
1463                 return 0
1464         }
1465         var size int
1466         // field[1] m.SwIfIndex
1467         size += 4
1468         // field[1] m.NewShowDevInstance
1469         size += 4
1470         return size
1471 }
1472 func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
1473         o := binary.BigEndian
1474         _ = o
1475         pos := 0
1476         _ = pos
1477         var buf []byte
1478         if b == nil {
1479                 buf = make([]byte, m.Size())
1480         } else {
1481                 buf = b
1482         }
1483         // field[1] m.SwIfIndex
1484         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1485         pos += 4
1486         // field[1] m.NewShowDevInstance
1487         o.PutUint32(buf[pos:pos+4], uint32(m.NewShowDevInstance))
1488         pos += 4
1489         return buf, nil
1490 }
1491 func (m *InterfaceNameRenumber) Unmarshal(tmp []byte) error {
1492         o := binary.BigEndian
1493         _ = o
1494         pos := 0
1495         _ = pos
1496         // field[1] m.SwIfIndex
1497         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1498         pos += 4
1499         // field[1] m.NewShowDevInstance
1500         m.NewShowDevInstance = uint32(o.Uint32(tmp[pos : pos+4]))
1501         pos += 4
1502         return nil
1503 }
1504
1505 // InterfaceNameRenumberReply represents VPP binary API message 'interface_name_renumber_reply'.
1506 type InterfaceNameRenumberReply struct {
1507         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1508 }
1509
1510 func (m *InterfaceNameRenumberReply) Reset()                        { *m = InterfaceNameRenumberReply{} }
1511 func (*InterfaceNameRenumberReply) GetMessageName() string          { return "interface_name_renumber_reply" }
1512 func (*InterfaceNameRenumberReply) GetCrcString() string            { return "e8d4e804" }
1513 func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1514
1515 func (m *InterfaceNameRenumberReply) Size() int {
1516         if m == nil {
1517                 return 0
1518         }
1519         var size int
1520         // field[1] m.Retval
1521         size += 4
1522         return size
1523 }
1524 func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) {
1525         o := binary.BigEndian
1526         _ = o
1527         pos := 0
1528         _ = pos
1529         var buf []byte
1530         if b == nil {
1531                 buf = make([]byte, m.Size())
1532         } else {
1533                 buf = b
1534         }
1535         // field[1] m.Retval
1536         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1537         pos += 4
1538         return buf, nil
1539 }
1540 func (m *InterfaceNameRenumberReply) Unmarshal(tmp []byte) error {
1541         o := binary.BigEndian
1542         _ = o
1543         pos := 0
1544         _ = pos
1545         // field[1] m.Retval
1546         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1547         pos += 4
1548         return nil
1549 }
1550
1551 // SwInterfaceAddDelAddress represents VPP binary API message 'sw_interface_add_del_address'.
1552 type SwInterfaceAddDelAddress struct {
1553         SwIfIndex InterfaceIndex    `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1554         IsAdd     bool              `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1555         DelAll    bool              `binapi:"bool,name=del_all" json:"del_all,omitempty"`
1556         Prefix    AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
1557 }
1558
1559 func (m *SwInterfaceAddDelAddress) Reset()                        { *m = SwInterfaceAddDelAddress{} }
1560 func (*SwInterfaceAddDelAddress) GetMessageName() string          { return "sw_interface_add_del_address" }
1561 func (*SwInterfaceAddDelAddress) GetCrcString() string            { return "5803d5c4" }
1562 func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { return api.RequestMessage }
1563
1564 func (m *SwInterfaceAddDelAddress) Size() int {
1565         if m == nil {
1566                 return 0
1567         }
1568         var size int
1569         // field[1] m.SwIfIndex
1570         size += 4
1571         // field[1] m.IsAdd
1572         size += 1
1573         // field[1] m.DelAll
1574         size += 1
1575         // field[1] m.Prefix
1576         // field[2] m.Prefix.Address
1577         // field[3] m.Prefix.Address.Af
1578         size += 4
1579         // field[3] m.Prefix.Address.Un
1580         size += 16
1581         // field[2] m.Prefix.Len
1582         size += 1
1583         return size
1584 }
1585 func (m *SwInterfaceAddDelAddress) 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.SwIfIndex
1597         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1598         pos += 4
1599         // field[1] m.IsAdd
1600         if m.IsAdd {
1601                 buf[pos] = 1
1602         }
1603         pos += 1
1604         // field[1] m.DelAll
1605         if m.DelAll {
1606                 buf[pos] = 1
1607         }
1608         pos += 1
1609         // field[1] m.Prefix
1610         // field[2] m.Prefix.Address
1611         // field[3] m.Prefix.Address.Af
1612         o.PutUint32(buf[pos:pos+4], uint32(m.Prefix.Address.Af))
1613         pos += 4
1614         // field[3] m.Prefix.Address.Un
1615         copy(buf[pos:pos+16], m.Prefix.Address.Un.XXX_UnionData[:])
1616         pos += 16
1617         // field[2] m.Prefix.Len
1618         buf[pos] = uint8(m.Prefix.Len)
1619         pos += 1
1620         return buf, nil
1621 }
1622 func (m *SwInterfaceAddDelAddress) Unmarshal(tmp []byte) error {
1623         o := binary.BigEndian
1624         _ = o
1625         pos := 0
1626         _ = pos
1627         // field[1] m.SwIfIndex
1628         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1629         pos += 4
1630         // field[1] m.IsAdd
1631         m.IsAdd = tmp[pos] != 0
1632         pos += 1
1633         // field[1] m.DelAll
1634         m.DelAll = tmp[pos] != 0
1635         pos += 1
1636         // field[1] m.Prefix
1637         // field[2] m.Prefix.Address
1638         // field[3] m.Prefix.Address.Af
1639         m.Prefix.Address.Af = AddressFamily(o.Uint32(tmp[pos : pos+4]))
1640         pos += 4
1641         // field[3] m.Prefix.Address.Un
1642         copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
1643         pos += 16
1644         // field[2] m.Prefix.Len
1645         m.Prefix.Len = uint8(tmp[pos])
1646         pos += 1
1647         return nil
1648 }
1649
1650 // SwInterfaceAddDelAddressReply represents VPP binary API message 'sw_interface_add_del_address_reply'.
1651 type SwInterfaceAddDelAddressReply struct {
1652         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1653 }
1654
1655 func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
1656 func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
1657         return "sw_interface_add_del_address_reply"
1658 }
1659 func (*SwInterfaceAddDelAddressReply) GetCrcString() string            { return "e8d4e804" }
1660 func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1661
1662 func (m *SwInterfaceAddDelAddressReply) Size() int {
1663         if m == nil {
1664                 return 0
1665         }
1666         var size int
1667         // field[1] m.Retval
1668         size += 4
1669         return size
1670 }
1671 func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) {
1672         o := binary.BigEndian
1673         _ = o
1674         pos := 0
1675         _ = pos
1676         var buf []byte
1677         if b == nil {
1678                 buf = make([]byte, m.Size())
1679         } else {
1680                 buf = b
1681         }
1682         // field[1] m.Retval
1683         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1684         pos += 4
1685         return buf, nil
1686 }
1687 func (m *SwInterfaceAddDelAddressReply) Unmarshal(tmp []byte) error {
1688         o := binary.BigEndian
1689         _ = o
1690         pos := 0
1691         _ = pos
1692         // field[1] m.Retval
1693         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1694         pos += 4
1695         return nil
1696 }
1697
1698 // SwInterfaceAddDelMacAddress represents VPP binary API message 'sw_interface_add_del_mac_address'.
1699 type SwInterfaceAddDelMacAddress struct {
1700         SwIfIndex uint32     `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1701         Addr      MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
1702         IsAdd     uint8      `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1703 }
1704
1705 func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
1706 func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
1707         return "sw_interface_add_del_mac_address"
1708 }
1709 func (*SwInterfaceAddDelMacAddress) GetCrcString() string            { return "638bb9f4" }
1710 func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType { return api.RequestMessage }
1711
1712 func (m *SwInterfaceAddDelMacAddress) Size() int {
1713         if m == nil {
1714                 return 0
1715         }
1716         var size int
1717         // field[1] m.SwIfIndex
1718         size += 4
1719         // field[1] m.Addr
1720         size += 6
1721         // field[1] m.IsAdd
1722         size += 1
1723         return size
1724 }
1725 func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
1726         o := binary.BigEndian
1727         _ = o
1728         pos := 0
1729         _ = pos
1730         var buf []byte
1731         if b == nil {
1732                 buf = make([]byte, m.Size())
1733         } else {
1734                 buf = b
1735         }
1736         // field[1] m.SwIfIndex
1737         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1738         pos += 4
1739         // field[1] m.Addr
1740         for i := 0; i < 6; i++ {
1741                 var x uint8
1742                 if i < len(m.Addr) {
1743                         x = uint8(m.Addr[i])
1744                 }
1745                 buf[pos] = uint8(x)
1746                 pos += 1
1747         }
1748         // field[1] m.IsAdd
1749         buf[pos] = uint8(m.IsAdd)
1750         pos += 1
1751         return buf, nil
1752 }
1753 func (m *SwInterfaceAddDelMacAddress) Unmarshal(tmp []byte) error {
1754         o := binary.BigEndian
1755         _ = o
1756         pos := 0
1757         _ = pos
1758         // field[1] m.SwIfIndex
1759         m.SwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
1760         pos += 4
1761         // field[1] m.Addr
1762         for i := 0; i < len(m.Addr); i++ {
1763                 m.Addr[i] = uint8(tmp[pos])
1764                 pos += 1
1765         }
1766         // field[1] m.IsAdd
1767         m.IsAdd = uint8(tmp[pos])
1768         pos += 1
1769         return nil
1770 }
1771
1772 // SwInterfaceAddDelMacAddressReply represents VPP binary API message 'sw_interface_add_del_mac_address_reply'.
1773 type SwInterfaceAddDelMacAddressReply struct {
1774         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1775 }
1776
1777 func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
1778 func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
1779         return "sw_interface_add_del_mac_address_reply"
1780 }
1781 func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string            { return "e8d4e804" }
1782 func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1783
1784 func (m *SwInterfaceAddDelMacAddressReply) Size() int {
1785         if m == nil {
1786                 return 0
1787         }
1788         var size int
1789         // field[1] m.Retval
1790         size += 4
1791         return size
1792 }
1793 func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) {
1794         o := binary.BigEndian
1795         _ = o
1796         pos := 0
1797         _ = pos
1798         var buf []byte
1799         if b == nil {
1800                 buf = make([]byte, m.Size())
1801         } else {
1802                 buf = b
1803         }
1804         // field[1] m.Retval
1805         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1806         pos += 4
1807         return buf, nil
1808 }
1809 func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(tmp []byte) error {
1810         o := binary.BigEndian
1811         _ = o
1812         pos := 0
1813         _ = pos
1814         // field[1] m.Retval
1815         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1816         pos += 4
1817         return nil
1818 }
1819
1820 // SwInterfaceClearStats represents VPP binary API message 'sw_interface_clear_stats'.
1821 type SwInterfaceClearStats struct {
1822         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1823 }
1824
1825 func (m *SwInterfaceClearStats) Reset()                        { *m = SwInterfaceClearStats{} }
1826 func (*SwInterfaceClearStats) GetMessageName() string          { return "sw_interface_clear_stats" }
1827 func (*SwInterfaceClearStats) GetCrcString() string            { return "f9e6675e" }
1828 func (*SwInterfaceClearStats) GetMessageType() api.MessageType { return api.RequestMessage }
1829
1830 func (m *SwInterfaceClearStats) Size() int {
1831         if m == nil {
1832                 return 0
1833         }
1834         var size int
1835         // field[1] m.SwIfIndex
1836         size += 4
1837         return size
1838 }
1839 func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) {
1840         o := binary.BigEndian
1841         _ = o
1842         pos := 0
1843         _ = pos
1844         var buf []byte
1845         if b == nil {
1846                 buf = make([]byte, m.Size())
1847         } else {
1848                 buf = b
1849         }
1850         // field[1] m.SwIfIndex
1851         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
1852         pos += 4
1853         return buf, nil
1854 }
1855 func (m *SwInterfaceClearStats) Unmarshal(tmp []byte) error {
1856         o := binary.BigEndian
1857         _ = o
1858         pos := 0
1859         _ = pos
1860         // field[1] m.SwIfIndex
1861         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
1862         pos += 4
1863         return nil
1864 }
1865
1866 // SwInterfaceClearStatsReply represents VPP binary API message 'sw_interface_clear_stats_reply'.
1867 type SwInterfaceClearStatsReply struct {
1868         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1869 }
1870
1871 func (m *SwInterfaceClearStatsReply) Reset()                        { *m = SwInterfaceClearStatsReply{} }
1872 func (*SwInterfaceClearStatsReply) GetMessageName() string          { return "sw_interface_clear_stats_reply" }
1873 func (*SwInterfaceClearStatsReply) GetCrcString() string            { return "e8d4e804" }
1874 func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
1875
1876 func (m *SwInterfaceClearStatsReply) Size() int {
1877         if m == nil {
1878                 return 0
1879         }
1880         var size int
1881         // field[1] m.Retval
1882         size += 4
1883         return size
1884 }
1885 func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) {
1886         o := binary.BigEndian
1887         _ = o
1888         pos := 0
1889         _ = pos
1890         var buf []byte
1891         if b == nil {
1892                 buf = make([]byte, m.Size())
1893         } else {
1894                 buf = b
1895         }
1896         // field[1] m.Retval
1897         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
1898         pos += 4
1899         return buf, nil
1900 }
1901 func (m *SwInterfaceClearStatsReply) Unmarshal(tmp []byte) error {
1902         o := binary.BigEndian
1903         _ = o
1904         pos := 0
1905         _ = pos
1906         // field[1] m.Retval
1907         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
1908         pos += 4
1909         return nil
1910 }
1911
1912 // SwInterfaceDetails represents VPP binary API message 'sw_interface_details'.
1913 type SwInterfaceDetails struct {
1914         SwIfIndex        InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1915         SupSwIfIndex     uint32         `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
1916         L2Address        MacAddress     `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
1917         Flags            IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1918         Type             IfType         `binapi:"if_type,name=type" json:"type,omitempty"`
1919         LinkDuplex       LinkDuplex     `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
1920         LinkSpeed        uint32         `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
1921         LinkMtu          uint16         `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
1922         Mtu              []uint32       `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
1923         SubID            uint32         `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1924         SubNumberOfTags  uint8          `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
1925         SubOuterVlanID   uint16         `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
1926         SubInnerVlanID   uint16         `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
1927         SubIfFlags       SubIfFlags     `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1928         VtrOp            uint32         `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1929         VtrPushDot1q     uint32         `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
1930         VtrTag1          uint32         `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
1931         VtrTag2          uint32         `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
1932         OuterTag         uint16         `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1933         BDmac            MacAddress     `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1934         BSmac            MacAddress     `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1935         BVlanid          uint16         `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1936         ISid             uint32         `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1937         InterfaceName    string         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty" struc:"[64]byte"`
1938         InterfaceDevType string         `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty" struc:"[64]byte"`
1939         Tag              string         `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
1940 }
1941
1942 func (m *SwInterfaceDetails) Reset()                        { *m = SwInterfaceDetails{} }
1943 func (*SwInterfaceDetails) GetMessageName() string          { return "sw_interface_details" }
1944 func (*SwInterfaceDetails) GetCrcString() string            { return "17b69fa2" }
1945 func (*SwInterfaceDetails) GetMessageType() api.MessageType { return api.ReplyMessage }
1946
1947 func (m *SwInterfaceDetails) Size() int {
1948         if m == nil {
1949                 return 0
1950         }
1951         var size int
1952         // field[1] m.SwIfIndex
1953         size += 4
1954         // field[1] m.SupSwIfIndex
1955         size += 4
1956         // field[1] m.L2Address
1957         size += 6
1958         // field[1] m.Flags
1959         size += 4
1960         // field[1] m.Type
1961         size += 4
1962         // field[1] m.LinkDuplex
1963         size += 4
1964         // field[1] m.LinkSpeed
1965         size += 4
1966         // field[1] m.LinkMtu
1967         size += 2
1968         // field[1] m.Mtu
1969         size += 16
1970         // field[1] m.SubID
1971         size += 4
1972         // field[1] m.SubNumberOfTags
1973         size += 1
1974         // field[1] m.SubOuterVlanID
1975         size += 2
1976         // field[1] m.SubInnerVlanID
1977         size += 2
1978         // field[1] m.SubIfFlags
1979         size += 4
1980         // field[1] m.VtrOp
1981         size += 4
1982         // field[1] m.VtrPushDot1q
1983         size += 4
1984         // field[1] m.VtrTag1
1985         size += 4
1986         // field[1] m.VtrTag2
1987         size += 4
1988         // field[1] m.OuterTag
1989         size += 2
1990         // field[1] m.BDmac
1991         size += 6
1992         // field[1] m.BSmac
1993         size += 6
1994         // field[1] m.BVlanid
1995         size += 2
1996         // field[1] m.ISid
1997         size += 4
1998         // field[1] m.InterfaceName
1999         size += 64
2000         // field[1] m.InterfaceDevType
2001         size += 64
2002         // field[1] m.Tag
2003         size += 64
2004         return size
2005 }
2006 func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
2007         o := binary.BigEndian
2008         _ = o
2009         pos := 0
2010         _ = pos
2011         var buf []byte
2012         if b == nil {
2013                 buf = make([]byte, m.Size())
2014         } else {
2015                 buf = b
2016         }
2017         // field[1] m.SwIfIndex
2018         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2019         pos += 4
2020         // field[1] m.SupSwIfIndex
2021         o.PutUint32(buf[pos:pos+4], uint32(m.SupSwIfIndex))
2022         pos += 4
2023         // field[1] m.L2Address
2024         for i := 0; i < 6; i++ {
2025                 var x uint8
2026                 if i < len(m.L2Address) {
2027                         x = uint8(m.L2Address[i])
2028                 }
2029                 buf[pos] = uint8(x)
2030                 pos += 1
2031         }
2032         // field[1] m.Flags
2033         o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
2034         pos += 4
2035         // field[1] m.Type
2036         o.PutUint32(buf[pos:pos+4], uint32(m.Type))
2037         pos += 4
2038         // field[1] m.LinkDuplex
2039         o.PutUint32(buf[pos:pos+4], uint32(m.LinkDuplex))
2040         pos += 4
2041         // field[1] m.LinkSpeed
2042         o.PutUint32(buf[pos:pos+4], uint32(m.LinkSpeed))
2043         pos += 4
2044         // field[1] m.LinkMtu
2045         o.PutUint16(buf[pos:pos+2], uint16(m.LinkMtu))
2046         pos += 2
2047         // field[1] m.Mtu
2048         for i := 0; i < 4; i++ {
2049                 var x uint32
2050                 if i < len(m.Mtu) {
2051                         x = uint32(m.Mtu[i])
2052                 }
2053                 o.PutUint32(buf[pos:pos+4], uint32(x))
2054                 pos += 4
2055         }
2056         // field[1] m.SubID
2057         o.PutUint32(buf[pos:pos+4], uint32(m.SubID))
2058         pos += 4
2059         // field[1] m.SubNumberOfTags
2060         buf[pos] = uint8(m.SubNumberOfTags)
2061         pos += 1
2062         // field[1] m.SubOuterVlanID
2063         o.PutUint16(buf[pos:pos+2], uint16(m.SubOuterVlanID))
2064         pos += 2
2065         // field[1] m.SubInnerVlanID
2066         o.PutUint16(buf[pos:pos+2], uint16(m.SubInnerVlanID))
2067         pos += 2
2068         // field[1] m.SubIfFlags
2069         o.PutUint32(buf[pos:pos+4], uint32(m.SubIfFlags))
2070         pos += 4
2071         // field[1] m.VtrOp
2072         o.PutUint32(buf[pos:pos+4], uint32(m.VtrOp))
2073         pos += 4
2074         // field[1] m.VtrPushDot1q
2075         o.PutUint32(buf[pos:pos+4], uint32(m.VtrPushDot1q))
2076         pos += 4
2077         // field[1] m.VtrTag1
2078         o.PutUint32(buf[pos:pos+4], uint32(m.VtrTag1))
2079         pos += 4
2080         // field[1] m.VtrTag2
2081         o.PutUint32(buf[pos:pos+4], uint32(m.VtrTag2))
2082         pos += 4
2083         // field[1] m.OuterTag
2084         o.PutUint16(buf[pos:pos+2], uint16(m.OuterTag))
2085         pos += 2
2086         // field[1] m.BDmac
2087         for i := 0; i < 6; i++ {
2088                 var x uint8
2089                 if i < len(m.BDmac) {
2090                         x = uint8(m.BDmac[i])
2091                 }
2092                 buf[pos] = uint8(x)
2093                 pos += 1
2094         }
2095         // field[1] m.BSmac
2096         for i := 0; i < 6; i++ {
2097                 var x uint8
2098                 if i < len(m.BSmac) {
2099                         x = uint8(m.BSmac[i])
2100                 }
2101                 buf[pos] = uint8(x)
2102                 pos += 1
2103         }
2104         // field[1] m.BVlanid
2105         o.PutUint16(buf[pos:pos+2], uint16(m.BVlanid))
2106         pos += 2
2107         // field[1] m.ISid
2108         o.PutUint32(buf[pos:pos+4], uint32(m.ISid))
2109         pos += 4
2110         // field[1] m.InterfaceName
2111         copy(buf[pos:pos+64], m.InterfaceName)
2112         pos += 64
2113         // field[1] m.InterfaceDevType
2114         copy(buf[pos:pos+64], m.InterfaceDevType)
2115         pos += 64
2116         // field[1] m.Tag
2117         copy(buf[pos:pos+64], m.Tag)
2118         pos += 64
2119         return buf, nil
2120 }
2121 func (m *SwInterfaceDetails) Unmarshal(tmp []byte) error {
2122         o := binary.BigEndian
2123         _ = o
2124         pos := 0
2125         _ = pos
2126         // field[1] m.SwIfIndex
2127         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2128         pos += 4
2129         // field[1] m.SupSwIfIndex
2130         m.SupSwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
2131         pos += 4
2132         // field[1] m.L2Address
2133         for i := 0; i < len(m.L2Address); i++ {
2134                 m.L2Address[i] = uint8(tmp[pos])
2135                 pos += 1
2136         }
2137         // field[1] m.Flags
2138         m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
2139         pos += 4
2140         // field[1] m.Type
2141         m.Type = IfType(o.Uint32(tmp[pos : pos+4]))
2142         pos += 4
2143         // field[1] m.LinkDuplex
2144         m.LinkDuplex = LinkDuplex(o.Uint32(tmp[pos : pos+4]))
2145         pos += 4
2146         // field[1] m.LinkSpeed
2147         m.LinkSpeed = uint32(o.Uint32(tmp[pos : pos+4]))
2148         pos += 4
2149         // field[1] m.LinkMtu
2150         m.LinkMtu = uint16(o.Uint16(tmp[pos : pos+2]))
2151         pos += 2
2152         // field[1] m.Mtu
2153         m.Mtu = make([]uint32, 4)
2154         for i := 0; i < len(m.Mtu); i++ {
2155                 m.Mtu[i] = uint32(o.Uint32(tmp[pos : pos+4]))
2156                 pos += 4
2157         }
2158         // field[1] m.SubID
2159         m.SubID = uint32(o.Uint32(tmp[pos : pos+4]))
2160         pos += 4
2161         // field[1] m.SubNumberOfTags
2162         m.SubNumberOfTags = uint8(tmp[pos])
2163         pos += 1
2164         // field[1] m.SubOuterVlanID
2165         m.SubOuterVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
2166         pos += 2
2167         // field[1] m.SubInnerVlanID
2168         m.SubInnerVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
2169         pos += 2
2170         // field[1] m.SubIfFlags
2171         m.SubIfFlags = SubIfFlags(o.Uint32(tmp[pos : pos+4]))
2172         pos += 4
2173         // field[1] m.VtrOp
2174         m.VtrOp = uint32(o.Uint32(tmp[pos : pos+4]))
2175         pos += 4
2176         // field[1] m.VtrPushDot1q
2177         m.VtrPushDot1q = uint32(o.Uint32(tmp[pos : pos+4]))
2178         pos += 4
2179         // field[1] m.VtrTag1
2180         m.VtrTag1 = uint32(o.Uint32(tmp[pos : pos+4]))
2181         pos += 4
2182         // field[1] m.VtrTag2
2183         m.VtrTag2 = uint32(o.Uint32(tmp[pos : pos+4]))
2184         pos += 4
2185         // field[1] m.OuterTag
2186         m.OuterTag = uint16(o.Uint16(tmp[pos : pos+2]))
2187         pos += 2
2188         // field[1] m.BDmac
2189         for i := 0; i < len(m.BDmac); i++ {
2190                 m.BDmac[i] = uint8(tmp[pos])
2191                 pos += 1
2192         }
2193         // field[1] m.BSmac
2194         for i := 0; i < len(m.BSmac); i++ {
2195                 m.BSmac[i] = uint8(tmp[pos])
2196                 pos += 1
2197         }
2198         // field[1] m.BVlanid
2199         m.BVlanid = uint16(o.Uint16(tmp[pos : pos+2]))
2200         pos += 2
2201         // field[1] m.ISid
2202         m.ISid = uint32(o.Uint32(tmp[pos : pos+4]))
2203         pos += 4
2204         // field[1] m.InterfaceName
2205         {
2206                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
2207                 m.InterfaceName = codec.DecodeString(tmp[pos : pos+nul])
2208                 pos += 64
2209         }
2210         // field[1] m.InterfaceDevType
2211         {
2212                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
2213                 m.InterfaceDevType = codec.DecodeString(tmp[pos : pos+nul])
2214                 pos += 64
2215         }
2216         // field[1] m.Tag
2217         {
2218                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
2219                 m.Tag = codec.DecodeString(tmp[pos : pos+nul])
2220                 pos += 64
2221         }
2222         return nil
2223 }
2224
2225 // SwInterfaceDump represents VPP binary API message 'sw_interface_dump'.
2226 type SwInterfaceDump struct {
2227         SwIfIndex         InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
2228         NameFilterValid   bool           `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
2229         XXX_NameFilterLen uint32         `struc:"sizeof=NameFilter"`
2230         NameFilter        string         `json:"name_filter,omitempty"`
2231 }
2232
2233 func (m *SwInterfaceDump) Reset()                        { *m = SwInterfaceDump{} }
2234 func (*SwInterfaceDump) GetMessageName() string          { return "sw_interface_dump" }
2235 func (*SwInterfaceDump) GetCrcString() string            { return "aa610c27" }
2236 func (*SwInterfaceDump) GetMessageType() api.MessageType { return api.RequestMessage }
2237
2238 func (m *SwInterfaceDump) Size() int {
2239         if m == nil {
2240                 return 0
2241         }
2242         var size int
2243         // field[1] m.SwIfIndex
2244         size += 4
2245         // field[1] m.NameFilterValid
2246         size += 1
2247         // field[1] m.NameFilter
2248         size += 4 + len(m.NameFilter)
2249         return size
2250 }
2251 func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
2252         o := binary.BigEndian
2253         _ = o
2254         pos := 0
2255         _ = pos
2256         var buf []byte
2257         if b == nil {
2258                 buf = make([]byte, m.Size())
2259         } else {
2260                 buf = b
2261         }
2262         // field[1] m.SwIfIndex
2263         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2264         pos += 4
2265         // field[1] m.NameFilterValid
2266         if m.NameFilterValid {
2267                 buf[pos] = 1
2268         }
2269         pos += 1
2270         // field[1] m.NameFilter
2271         o.PutUint32(buf[pos:pos+4], uint32(len(m.NameFilter)))
2272         pos += 4
2273         copy(buf[pos:pos+len(m.NameFilter)], m.NameFilter[:])
2274         pos += len(m.NameFilter)
2275         return buf, nil
2276 }
2277 func (m *SwInterfaceDump) Unmarshal(tmp []byte) error {
2278         o := binary.BigEndian
2279         _ = o
2280         pos := 0
2281         _ = pos
2282         // field[1] m.SwIfIndex
2283         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2284         pos += 4
2285         // field[1] m.NameFilterValid
2286         m.NameFilterValid = tmp[pos] != 0
2287         pos += 1
2288         // field[1] m.NameFilter
2289         {
2290                 siz := o.Uint32(tmp[pos : pos+4])
2291                 pos += 4
2292                 m.NameFilter = codec.DecodeString(tmp[pos : pos+int(siz)])
2293                 pos += len(m.NameFilter)
2294         }
2295         return nil
2296 }
2297
2298 // SwInterfaceEvent represents VPP binary API message 'sw_interface_event'.
2299 type SwInterfaceEvent struct {
2300         PID       uint32         `binapi:"u32,name=pid" json:"pid,omitempty"`
2301         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2302         Flags     IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
2303         Deleted   bool           `binapi:"bool,name=deleted" json:"deleted,omitempty"`
2304 }
2305
2306 func (m *SwInterfaceEvent) Reset()                        { *m = SwInterfaceEvent{} }
2307 func (*SwInterfaceEvent) GetMessageName() string          { return "sw_interface_event" }
2308 func (*SwInterfaceEvent) GetCrcString() string            { return "f709f78d" }
2309 func (*SwInterfaceEvent) GetMessageType() api.MessageType { return api.EventMessage }
2310
2311 func (m *SwInterfaceEvent) Size() int {
2312         if m == nil {
2313                 return 0
2314         }
2315         var size int
2316         // field[1] m.PID
2317         size += 4
2318         // field[1] m.SwIfIndex
2319         size += 4
2320         // field[1] m.Flags
2321         size += 4
2322         // field[1] m.Deleted
2323         size += 1
2324         return size
2325 }
2326 func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
2327         o := binary.BigEndian
2328         _ = o
2329         pos := 0
2330         _ = pos
2331         var buf []byte
2332         if b == nil {
2333                 buf = make([]byte, m.Size())
2334         } else {
2335                 buf = b
2336         }
2337         // field[1] m.PID
2338         o.PutUint32(buf[pos:pos+4], uint32(m.PID))
2339         pos += 4
2340         // field[1] m.SwIfIndex
2341         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2342         pos += 4
2343         // field[1] m.Flags
2344         o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
2345         pos += 4
2346         // field[1] m.Deleted
2347         if m.Deleted {
2348                 buf[pos] = 1
2349         }
2350         pos += 1
2351         return buf, nil
2352 }
2353 func (m *SwInterfaceEvent) Unmarshal(tmp []byte) error {
2354         o := binary.BigEndian
2355         _ = o
2356         pos := 0
2357         _ = pos
2358         // field[1] m.PID
2359         m.PID = uint32(o.Uint32(tmp[pos : pos+4]))
2360         pos += 4
2361         // field[1] m.SwIfIndex
2362         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2363         pos += 4
2364         // field[1] m.Flags
2365         m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
2366         pos += 4
2367         // field[1] m.Deleted
2368         m.Deleted = tmp[pos] != 0
2369         pos += 1
2370         return nil
2371 }
2372
2373 // SwInterfaceGetMacAddress represents VPP binary API message 'sw_interface_get_mac_address'.
2374 type SwInterfaceGetMacAddress struct {
2375         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2376 }
2377
2378 func (m *SwInterfaceGetMacAddress) Reset()                        { *m = SwInterfaceGetMacAddress{} }
2379 func (*SwInterfaceGetMacAddress) GetMessageName() string          { return "sw_interface_get_mac_address" }
2380 func (*SwInterfaceGetMacAddress) GetCrcString() string            { return "f9e6675e" }
2381 func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType { return api.RequestMessage }
2382
2383 func (m *SwInterfaceGetMacAddress) Size() int {
2384         if m == nil {
2385                 return 0
2386         }
2387         var size int
2388         // field[1] m.SwIfIndex
2389         size += 4
2390         return size
2391 }
2392 func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) {
2393         o := binary.BigEndian
2394         _ = o
2395         pos := 0
2396         _ = pos
2397         var buf []byte
2398         if b == nil {
2399                 buf = make([]byte, m.Size())
2400         } else {
2401                 buf = b
2402         }
2403         // field[1] m.SwIfIndex
2404         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2405         pos += 4
2406         return buf, nil
2407 }
2408 func (m *SwInterfaceGetMacAddress) Unmarshal(tmp []byte) error {
2409         o := binary.BigEndian
2410         _ = o
2411         pos := 0
2412         _ = pos
2413         // field[1] m.SwIfIndex
2414         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2415         pos += 4
2416         return nil
2417 }
2418
2419 // SwInterfaceGetMacAddressReply represents VPP binary API message 'sw_interface_get_mac_address_reply'.
2420 type SwInterfaceGetMacAddressReply struct {
2421         Retval     int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
2422         MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
2423 }
2424
2425 func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
2426 func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
2427         return "sw_interface_get_mac_address_reply"
2428 }
2429 func (*SwInterfaceGetMacAddressReply) GetCrcString() string            { return "40ef2c08" }
2430 func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2431
2432 func (m *SwInterfaceGetMacAddressReply) Size() int {
2433         if m == nil {
2434                 return 0
2435         }
2436         var size int
2437         // field[1] m.Retval
2438         size += 4
2439         // field[1] m.MacAddress
2440         size += 6
2441         return size
2442 }
2443 func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
2444         o := binary.BigEndian
2445         _ = o
2446         pos := 0
2447         _ = pos
2448         var buf []byte
2449         if b == nil {
2450                 buf = make([]byte, m.Size())
2451         } else {
2452                 buf = b
2453         }
2454         // field[1] m.Retval
2455         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2456         pos += 4
2457         // field[1] m.MacAddress
2458         for i := 0; i < 6; i++ {
2459                 var x uint8
2460                 if i < len(m.MacAddress) {
2461                         x = uint8(m.MacAddress[i])
2462                 }
2463                 buf[pos] = uint8(x)
2464                 pos += 1
2465         }
2466         return buf, nil
2467 }
2468 func (m *SwInterfaceGetMacAddressReply) Unmarshal(tmp []byte) error {
2469         o := binary.BigEndian
2470         _ = o
2471         pos := 0
2472         _ = pos
2473         // field[1] m.Retval
2474         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2475         pos += 4
2476         // field[1] m.MacAddress
2477         for i := 0; i < len(m.MacAddress); i++ {
2478                 m.MacAddress[i] = uint8(tmp[pos])
2479                 pos += 1
2480         }
2481         return nil
2482 }
2483
2484 // SwInterfaceGetTable represents VPP binary API message 'sw_interface_get_table'.
2485 type SwInterfaceGetTable struct {
2486         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2487         IsIPv6    bool           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2488 }
2489
2490 func (m *SwInterfaceGetTable) Reset()                        { *m = SwInterfaceGetTable{} }
2491 func (*SwInterfaceGetTable) GetMessageName() string          { return "sw_interface_get_table" }
2492 func (*SwInterfaceGetTable) GetCrcString() string            { return "2d033de4" }
2493 func (*SwInterfaceGetTable) GetMessageType() api.MessageType { return api.RequestMessage }
2494
2495 func (m *SwInterfaceGetTable) Size() int {
2496         if m == nil {
2497                 return 0
2498         }
2499         var size int
2500         // field[1] m.SwIfIndex
2501         size += 4
2502         // field[1] m.IsIPv6
2503         size += 1
2504         return size
2505 }
2506 func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
2507         o := binary.BigEndian
2508         _ = o
2509         pos := 0
2510         _ = pos
2511         var buf []byte
2512         if b == nil {
2513                 buf = make([]byte, m.Size())
2514         } else {
2515                 buf = b
2516         }
2517         // field[1] m.SwIfIndex
2518         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2519         pos += 4
2520         // field[1] m.IsIPv6
2521         if m.IsIPv6 {
2522                 buf[pos] = 1
2523         }
2524         pos += 1
2525         return buf, nil
2526 }
2527 func (m *SwInterfaceGetTable) Unmarshal(tmp []byte) error {
2528         o := binary.BigEndian
2529         _ = o
2530         pos := 0
2531         _ = pos
2532         // field[1] m.SwIfIndex
2533         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2534         pos += 4
2535         // field[1] m.IsIPv6
2536         m.IsIPv6 = tmp[pos] != 0
2537         pos += 1
2538         return nil
2539 }
2540
2541 // SwInterfaceGetTableReply represents VPP binary API message 'sw_interface_get_table_reply'.
2542 type SwInterfaceGetTableReply struct {
2543         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2544         VrfID  uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2545 }
2546
2547 func (m *SwInterfaceGetTableReply) Reset()                        { *m = SwInterfaceGetTableReply{} }
2548 func (*SwInterfaceGetTableReply) GetMessageName() string          { return "sw_interface_get_table_reply" }
2549 func (*SwInterfaceGetTableReply) GetCrcString() string            { return "a6eb0109" }
2550 func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2551
2552 func (m *SwInterfaceGetTableReply) Size() int {
2553         if m == nil {
2554                 return 0
2555         }
2556         var size int
2557         // field[1] m.Retval
2558         size += 4
2559         // field[1] m.VrfID
2560         size += 4
2561         return size
2562 }
2563 func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
2564         o := binary.BigEndian
2565         _ = o
2566         pos := 0
2567         _ = pos
2568         var buf []byte
2569         if b == nil {
2570                 buf = make([]byte, m.Size())
2571         } else {
2572                 buf = b
2573         }
2574         // field[1] m.Retval
2575         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2576         pos += 4
2577         // field[1] m.VrfID
2578         o.PutUint32(buf[pos:pos+4], uint32(m.VrfID))
2579         pos += 4
2580         return buf, nil
2581 }
2582 func (m *SwInterfaceGetTableReply) Unmarshal(tmp []byte) error {
2583         o := binary.BigEndian
2584         _ = o
2585         pos := 0
2586         _ = pos
2587         // field[1] m.Retval
2588         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2589         pos += 4
2590         // field[1] m.VrfID
2591         m.VrfID = uint32(o.Uint32(tmp[pos : pos+4]))
2592         pos += 4
2593         return nil
2594 }
2595
2596 // SwInterfaceRxPlacementDetails represents VPP binary API message 'sw_interface_rx_placement_details'.
2597 type SwInterfaceRxPlacementDetails struct {
2598         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2599         QueueID   uint32         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2600         WorkerID  uint32         `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2601         Mode      RxMode         `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
2602 }
2603
2604 func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
2605 func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
2606         return "sw_interface_rx_placement_details"
2607 }
2608 func (*SwInterfaceRxPlacementDetails) GetCrcString() string            { return "f6d7d024" }
2609 func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType { return api.RequestMessage }
2610
2611 func (m *SwInterfaceRxPlacementDetails) Size() int {
2612         if m == nil {
2613                 return 0
2614         }
2615         var size int
2616         // field[1] m.SwIfIndex
2617         size += 4
2618         // field[1] m.QueueID
2619         size += 4
2620         // field[1] m.WorkerID
2621         size += 4
2622         // field[1] m.Mode
2623         size += 4
2624         return size
2625 }
2626 func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
2627         o := binary.BigEndian
2628         _ = o
2629         pos := 0
2630         _ = pos
2631         var buf []byte
2632         if b == nil {
2633                 buf = make([]byte, m.Size())
2634         } else {
2635                 buf = b
2636         }
2637         // field[1] m.SwIfIndex
2638         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2639         pos += 4
2640         // field[1] m.QueueID
2641         o.PutUint32(buf[pos:pos+4], uint32(m.QueueID))
2642         pos += 4
2643         // field[1] m.WorkerID
2644         o.PutUint32(buf[pos:pos+4], uint32(m.WorkerID))
2645         pos += 4
2646         // field[1] m.Mode
2647         o.PutUint32(buf[pos:pos+4], uint32(m.Mode))
2648         pos += 4
2649         return buf, nil
2650 }
2651 func (m *SwInterfaceRxPlacementDetails) Unmarshal(tmp []byte) error {
2652         o := binary.BigEndian
2653         _ = o
2654         pos := 0
2655         _ = pos
2656         // field[1] m.SwIfIndex
2657         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2658         pos += 4
2659         // field[1] m.QueueID
2660         m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
2661         pos += 4
2662         // field[1] m.WorkerID
2663         m.WorkerID = uint32(o.Uint32(tmp[pos : pos+4]))
2664         pos += 4
2665         // field[1] m.Mode
2666         m.Mode = RxMode(o.Uint32(tmp[pos : pos+4]))
2667         pos += 4
2668         return nil
2669 }
2670
2671 // SwInterfaceRxPlacementDump represents VPP binary API message 'sw_interface_rx_placement_dump'.
2672 type SwInterfaceRxPlacementDump struct {
2673         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2674 }
2675
2676 func (m *SwInterfaceRxPlacementDump) Reset()                        { *m = SwInterfaceRxPlacementDump{} }
2677 func (*SwInterfaceRxPlacementDump) GetMessageName() string          { return "sw_interface_rx_placement_dump" }
2678 func (*SwInterfaceRxPlacementDump) GetCrcString() string            { return "f9e6675e" }
2679 func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType { return api.RequestMessage }
2680
2681 func (m *SwInterfaceRxPlacementDump) Size() int {
2682         if m == nil {
2683                 return 0
2684         }
2685         var size int
2686         // field[1] m.SwIfIndex
2687         size += 4
2688         return size
2689 }
2690 func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) {
2691         o := binary.BigEndian
2692         _ = o
2693         pos := 0
2694         _ = pos
2695         var buf []byte
2696         if b == nil {
2697                 buf = make([]byte, m.Size())
2698         } else {
2699                 buf = b
2700         }
2701         // field[1] m.SwIfIndex
2702         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2703         pos += 4
2704         return buf, nil
2705 }
2706 func (m *SwInterfaceRxPlacementDump) Unmarshal(tmp []byte) error {
2707         o := binary.BigEndian
2708         _ = o
2709         pos := 0
2710         _ = pos
2711         // field[1] m.SwIfIndex
2712         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2713         pos += 4
2714         return nil
2715 }
2716
2717 // SwInterfaceSetFlags represents VPP binary API message 'sw_interface_set_flags'.
2718 type SwInterfaceSetFlags struct {
2719         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2720         Flags     IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
2721 }
2722
2723 func (m *SwInterfaceSetFlags) Reset()                        { *m = SwInterfaceSetFlags{} }
2724 func (*SwInterfaceSetFlags) GetMessageName() string          { return "sw_interface_set_flags" }
2725 func (*SwInterfaceSetFlags) GetCrcString() string            { return "6a2b491a" }
2726 func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { return api.RequestMessage }
2727
2728 func (m *SwInterfaceSetFlags) Size() int {
2729         if m == nil {
2730                 return 0
2731         }
2732         var size int
2733         // field[1] m.SwIfIndex
2734         size += 4
2735         // field[1] m.Flags
2736         size += 4
2737         return size
2738 }
2739 func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
2740         o := binary.BigEndian
2741         _ = o
2742         pos := 0
2743         _ = pos
2744         var buf []byte
2745         if b == nil {
2746                 buf = make([]byte, m.Size())
2747         } else {
2748                 buf = b
2749         }
2750         // field[1] m.SwIfIndex
2751         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2752         pos += 4
2753         // field[1] m.Flags
2754         o.PutUint32(buf[pos:pos+4], uint32(m.Flags))
2755         pos += 4
2756         return buf, nil
2757 }
2758 func (m *SwInterfaceSetFlags) Unmarshal(tmp []byte) error {
2759         o := binary.BigEndian
2760         _ = o
2761         pos := 0
2762         _ = pos
2763         // field[1] m.SwIfIndex
2764         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2765         pos += 4
2766         // field[1] m.Flags
2767         m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
2768         pos += 4
2769         return nil
2770 }
2771
2772 // SwInterfaceSetFlagsReply represents VPP binary API message 'sw_interface_set_flags_reply'.
2773 type SwInterfaceSetFlagsReply struct {
2774         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2775 }
2776
2777 func (m *SwInterfaceSetFlagsReply) Reset()                        { *m = SwInterfaceSetFlagsReply{} }
2778 func (*SwInterfaceSetFlagsReply) GetMessageName() string          { return "sw_interface_set_flags_reply" }
2779 func (*SwInterfaceSetFlagsReply) GetCrcString() string            { return "e8d4e804" }
2780 func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
2781
2782 func (m *SwInterfaceSetFlagsReply) Size() int {
2783         if m == nil {
2784                 return 0
2785         }
2786         var size int
2787         // field[1] m.Retval
2788         size += 4
2789         return size
2790 }
2791 func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) {
2792         o := binary.BigEndian
2793         _ = o
2794         pos := 0
2795         _ = pos
2796         var buf []byte
2797         if b == nil {
2798                 buf = make([]byte, m.Size())
2799         } else {
2800                 buf = b
2801         }
2802         // field[1] m.Retval
2803         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2804         pos += 4
2805         return buf, nil
2806 }
2807 func (m *SwInterfaceSetFlagsReply) Unmarshal(tmp []byte) error {
2808         o := binary.BigEndian
2809         _ = o
2810         pos := 0
2811         _ = pos
2812         // field[1] m.Retval
2813         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2814         pos += 4
2815         return nil
2816 }
2817
2818 // SwInterfaceSetIPDirectedBroadcast represents VPP binary API message 'sw_interface_set_ip_directed_broadcast'.
2819 type SwInterfaceSetIPDirectedBroadcast struct {
2820         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2821         Enable    bool           `binapi:"bool,name=enable" json:"enable,omitempty"`
2822 }
2823
2824 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
2825 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
2826         return "sw_interface_set_ip_directed_broadcast"
2827 }
2828 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string            { return "ae6cfcfb" }
2829 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType { return api.RequestMessage }
2830
2831 func (m *SwInterfaceSetIPDirectedBroadcast) Size() int {
2832         if m == nil {
2833                 return 0
2834         }
2835         var size int
2836         // field[1] m.SwIfIndex
2837         size += 4
2838         // field[1] m.Enable
2839         size += 1
2840         return size
2841 }
2842 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
2843         o := binary.BigEndian
2844         _ = o
2845         pos := 0
2846         _ = pos
2847         var buf []byte
2848         if b == nil {
2849                 buf = make([]byte, m.Size())
2850         } else {
2851                 buf = b
2852         }
2853         // field[1] m.SwIfIndex
2854         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2855         pos += 4
2856         // field[1] m.Enable
2857         if m.Enable {
2858                 buf[pos] = 1
2859         }
2860         pos += 1
2861         return buf, nil
2862 }
2863 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(tmp []byte) error {
2864         o := binary.BigEndian
2865         _ = o
2866         pos := 0
2867         _ = pos
2868         // field[1] m.SwIfIndex
2869         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2870         pos += 4
2871         // field[1] m.Enable
2872         m.Enable = tmp[pos] != 0
2873         pos += 1
2874         return nil
2875 }
2876
2877 // SwInterfaceSetIPDirectedBroadcastReply represents VPP binary API message 'sw_interface_set_ip_directed_broadcast_reply'.
2878 type SwInterfaceSetIPDirectedBroadcastReply struct {
2879         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2880 }
2881
2882 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
2883         *m = SwInterfaceSetIPDirectedBroadcastReply{}
2884 }
2885 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
2886         return "sw_interface_set_ip_directed_broadcast_reply"
2887 }
2888 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
2889 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
2890         return api.ReplyMessage
2891 }
2892
2893 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() int {
2894         if m == nil {
2895                 return 0
2896         }
2897         var size int
2898         // field[1] m.Retval
2899         size += 4
2900         return size
2901 }
2902 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
2903         o := binary.BigEndian
2904         _ = o
2905         pos := 0
2906         _ = pos
2907         var buf []byte
2908         if b == nil {
2909                 buf = make([]byte, m.Size())
2910         } else {
2911                 buf = b
2912         }
2913         // field[1] m.Retval
2914         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
2915         pos += 4
2916         return buf, nil
2917 }
2918 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(tmp []byte) error {
2919         o := binary.BigEndian
2920         _ = o
2921         pos := 0
2922         _ = pos
2923         // field[1] m.Retval
2924         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
2925         pos += 4
2926         return nil
2927 }
2928
2929 // SwInterfaceSetMacAddress represents VPP binary API message 'sw_interface_set_mac_address'.
2930 type SwInterfaceSetMacAddress struct {
2931         SwIfIndex  InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2932         MacAddress MacAddress     `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
2933 }
2934
2935 func (m *SwInterfaceSetMacAddress) Reset()                        { *m = SwInterfaceSetMacAddress{} }
2936 func (*SwInterfaceSetMacAddress) GetMessageName() string          { return "sw_interface_set_mac_address" }
2937 func (*SwInterfaceSetMacAddress) GetCrcString() string            { return "6aca746a" }
2938 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { return api.RequestMessage }
2939
2940 func (m *SwInterfaceSetMacAddress) Size() int {
2941         if m == nil {
2942                 return 0
2943         }
2944         var size int
2945         // field[1] m.SwIfIndex
2946         size += 4
2947         // field[1] m.MacAddress
2948         size += 6
2949         return size
2950 }
2951 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
2952         o := binary.BigEndian
2953         _ = o
2954         pos := 0
2955         _ = pos
2956         var buf []byte
2957         if b == nil {
2958                 buf = make([]byte, m.Size())
2959         } else {
2960                 buf = b
2961         }
2962         // field[1] m.SwIfIndex
2963         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
2964         pos += 4
2965         // field[1] m.MacAddress
2966         for i := 0; i < 6; i++ {
2967                 var x uint8
2968                 if i < len(m.MacAddress) {
2969                         x = uint8(m.MacAddress[i])
2970                 }
2971                 buf[pos] = uint8(x)
2972                 pos += 1
2973         }
2974         return buf, nil
2975 }
2976 func (m *SwInterfaceSetMacAddress) Unmarshal(tmp []byte) error {
2977         o := binary.BigEndian
2978         _ = o
2979         pos := 0
2980         _ = pos
2981         // field[1] m.SwIfIndex
2982         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
2983         pos += 4
2984         // field[1] m.MacAddress
2985         for i := 0; i < len(m.MacAddress); i++ {
2986                 m.MacAddress[i] = uint8(tmp[pos])
2987                 pos += 1
2988         }
2989         return nil
2990 }
2991
2992 // SwInterfaceSetMacAddressReply represents VPP binary API message 'sw_interface_set_mac_address_reply'.
2993 type SwInterfaceSetMacAddressReply struct {
2994         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2995 }
2996
2997 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
2998 func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
2999         return "sw_interface_set_mac_address_reply"
3000 }
3001 func (*SwInterfaceSetMacAddressReply) GetCrcString() string            { return "e8d4e804" }
3002 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3003
3004 func (m *SwInterfaceSetMacAddressReply) Size() int {
3005         if m == nil {
3006                 return 0
3007         }
3008         var size int
3009         // field[1] m.Retval
3010         size += 4
3011         return size
3012 }
3013 func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) {
3014         o := binary.BigEndian
3015         _ = o
3016         pos := 0
3017         _ = pos
3018         var buf []byte
3019         if b == nil {
3020                 buf = make([]byte, m.Size())
3021         } else {
3022                 buf = b
3023         }
3024         // field[1] m.Retval
3025         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3026         pos += 4
3027         return buf, nil
3028 }
3029 func (m *SwInterfaceSetMacAddressReply) Unmarshal(tmp []byte) error {
3030         o := binary.BigEndian
3031         _ = o
3032         pos := 0
3033         _ = pos
3034         // field[1] m.Retval
3035         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3036         pos += 4
3037         return nil
3038 }
3039
3040 // SwInterfaceSetMtu represents VPP binary API message 'sw_interface_set_mtu'.
3041 type SwInterfaceSetMtu struct {
3042         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3043         Mtu       []uint32       `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
3044 }
3045
3046 func (m *SwInterfaceSetMtu) Reset()                        { *m = SwInterfaceSetMtu{} }
3047 func (*SwInterfaceSetMtu) GetMessageName() string          { return "sw_interface_set_mtu" }
3048 func (*SwInterfaceSetMtu) GetCrcString() string            { return "5cbe85e5" }
3049 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { return api.RequestMessage }
3050
3051 func (m *SwInterfaceSetMtu) Size() int {
3052         if m == nil {
3053                 return 0
3054         }
3055         var size int
3056         // field[1] m.SwIfIndex
3057         size += 4
3058         // field[1] m.Mtu
3059         size += 16
3060         return size
3061 }
3062 func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
3063         o := binary.BigEndian
3064         _ = o
3065         pos := 0
3066         _ = pos
3067         var buf []byte
3068         if b == nil {
3069                 buf = make([]byte, m.Size())
3070         } else {
3071                 buf = b
3072         }
3073         // field[1] m.SwIfIndex
3074         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
3075         pos += 4
3076         // field[1] m.Mtu
3077         for i := 0; i < 4; i++ {
3078                 var x uint32
3079                 if i < len(m.Mtu) {
3080                         x = uint32(m.Mtu[i])
3081                 }
3082                 o.PutUint32(buf[pos:pos+4], uint32(x))
3083                 pos += 4
3084         }
3085         return buf, nil
3086 }
3087 func (m *SwInterfaceSetMtu) Unmarshal(tmp []byte) error {
3088         o := binary.BigEndian
3089         _ = o
3090         pos := 0
3091         _ = pos
3092         // field[1] m.SwIfIndex
3093         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3094         pos += 4
3095         // field[1] m.Mtu
3096         m.Mtu = make([]uint32, 4)
3097         for i := 0; i < len(m.Mtu); i++ {
3098                 m.Mtu[i] = uint32(o.Uint32(tmp[pos : pos+4]))
3099                 pos += 4
3100         }
3101         return nil
3102 }
3103
3104 // SwInterfaceSetMtuReply represents VPP binary API message 'sw_interface_set_mtu_reply'.
3105 type SwInterfaceSetMtuReply struct {
3106         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3107 }
3108
3109 func (m *SwInterfaceSetMtuReply) Reset()                        { *m = SwInterfaceSetMtuReply{} }
3110 func (*SwInterfaceSetMtuReply) GetMessageName() string          { return "sw_interface_set_mtu_reply" }
3111 func (*SwInterfaceSetMtuReply) GetCrcString() string            { return "e8d4e804" }
3112 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3113
3114 func (m *SwInterfaceSetMtuReply) Size() int {
3115         if m == nil {
3116                 return 0
3117         }
3118         var size int
3119         // field[1] m.Retval
3120         size += 4
3121         return size
3122 }
3123 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
3124         o := binary.BigEndian
3125         _ = o
3126         pos := 0
3127         _ = pos
3128         var buf []byte
3129         if b == nil {
3130                 buf = make([]byte, m.Size())
3131         } else {
3132                 buf = b
3133         }
3134         // field[1] m.Retval
3135         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3136         pos += 4
3137         return buf, nil
3138 }
3139 func (m *SwInterfaceSetMtuReply) Unmarshal(tmp []byte) error {
3140         o := binary.BigEndian
3141         _ = o
3142         pos := 0
3143         _ = pos
3144         // field[1] m.Retval
3145         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3146         pos += 4
3147         return nil
3148 }
3149
3150 // SwInterfaceSetRxMode represents VPP binary API message 'sw_interface_set_rx_mode'.
3151 type SwInterfaceSetRxMode struct {
3152         SwIfIndex    InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3153         QueueIDValid bool           `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
3154         QueueID      uint32         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
3155         Mode         RxMode         `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
3156 }
3157
3158 func (m *SwInterfaceSetRxMode) Reset()                        { *m = SwInterfaceSetRxMode{} }
3159 func (*SwInterfaceSetRxMode) GetMessageName() string          { return "sw_interface_set_rx_mode" }
3160 func (*SwInterfaceSetRxMode) GetCrcString() string            { return "780f5cee" }
3161 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { return api.RequestMessage }
3162
3163 func (m *SwInterfaceSetRxMode) Size() int {
3164         if m == nil {
3165                 return 0
3166         }
3167         var size int
3168         // field[1] m.SwIfIndex
3169         size += 4
3170         // field[1] m.QueueIDValid
3171         size += 1
3172         // field[1] m.QueueID
3173         size += 4
3174         // field[1] m.Mode
3175         size += 4
3176         return size
3177 }
3178 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
3179         o := binary.BigEndian
3180         _ = o
3181         pos := 0
3182         _ = pos
3183         var buf []byte
3184         if b == nil {
3185                 buf = make([]byte, m.Size())
3186         } else {
3187                 buf = b
3188         }
3189         // field[1] m.SwIfIndex
3190         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
3191         pos += 4
3192         // field[1] m.QueueIDValid
3193         if m.QueueIDValid {
3194                 buf[pos] = 1
3195         }
3196         pos += 1
3197         // field[1] m.QueueID
3198         o.PutUint32(buf[pos:pos+4], uint32(m.QueueID))
3199         pos += 4
3200         // field[1] m.Mode
3201         o.PutUint32(buf[pos:pos+4], uint32(m.Mode))
3202         pos += 4
3203         return buf, nil
3204 }
3205 func (m *SwInterfaceSetRxMode) Unmarshal(tmp []byte) error {
3206         o := binary.BigEndian
3207         _ = o
3208         pos := 0
3209         _ = pos
3210         // field[1] m.SwIfIndex
3211         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3212         pos += 4
3213         // field[1] m.QueueIDValid
3214         m.QueueIDValid = tmp[pos] != 0
3215         pos += 1
3216         // field[1] m.QueueID
3217         m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
3218         pos += 4
3219         // field[1] m.Mode
3220         m.Mode = RxMode(o.Uint32(tmp[pos : pos+4]))
3221         pos += 4
3222         return nil
3223 }
3224
3225 // SwInterfaceSetRxModeReply represents VPP binary API message 'sw_interface_set_rx_mode_reply'.
3226 type SwInterfaceSetRxModeReply struct {
3227         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3228 }
3229
3230 func (m *SwInterfaceSetRxModeReply) Reset()                        { *m = SwInterfaceSetRxModeReply{} }
3231 func (*SwInterfaceSetRxModeReply) GetMessageName() string          { return "sw_interface_set_rx_mode_reply" }
3232 func (*SwInterfaceSetRxModeReply) GetCrcString() string            { return "e8d4e804" }
3233 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3234
3235 func (m *SwInterfaceSetRxModeReply) Size() int {
3236         if m == nil {
3237                 return 0
3238         }
3239         var size int
3240         // field[1] m.Retval
3241         size += 4
3242         return size
3243 }
3244 func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) {
3245         o := binary.BigEndian
3246         _ = o
3247         pos := 0
3248         _ = pos
3249         var buf []byte
3250         if b == nil {
3251                 buf = make([]byte, m.Size())
3252         } else {
3253                 buf = b
3254         }
3255         // field[1] m.Retval
3256         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3257         pos += 4
3258         return buf, nil
3259 }
3260 func (m *SwInterfaceSetRxModeReply) Unmarshal(tmp []byte) error {
3261         o := binary.BigEndian
3262         _ = o
3263         pos := 0
3264         _ = pos
3265         // field[1] m.Retval
3266         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3267         pos += 4
3268         return nil
3269 }
3270
3271 // SwInterfaceSetRxPlacement represents VPP binary API message 'sw_interface_set_rx_placement'.
3272 type SwInterfaceSetRxPlacement struct {
3273         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3274         QueueID   uint32         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
3275         WorkerID  uint32         `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
3276         IsMain    bool           `binapi:"bool,name=is_main" json:"is_main,omitempty"`
3277 }
3278
3279 func (m *SwInterfaceSetRxPlacement) Reset()                        { *m = SwInterfaceSetRxPlacement{} }
3280 func (*SwInterfaceSetRxPlacement) GetMessageName() string          { return "sw_interface_set_rx_placement" }
3281 func (*SwInterfaceSetRxPlacement) GetCrcString() string            { return "db65f3c9" }
3282 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType { return api.RequestMessage }
3283
3284 func (m *SwInterfaceSetRxPlacement) Size() int {
3285         if m == nil {
3286                 return 0
3287         }
3288         var size int
3289         // field[1] m.SwIfIndex
3290         size += 4
3291         // field[1] m.QueueID
3292         size += 4
3293         // field[1] m.WorkerID
3294         size += 4
3295         // field[1] m.IsMain
3296         size += 1
3297         return size
3298 }
3299 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
3300         o := binary.BigEndian
3301         _ = o
3302         pos := 0
3303         _ = pos
3304         var buf []byte
3305         if b == nil {
3306                 buf = make([]byte, m.Size())
3307         } else {
3308                 buf = b
3309         }
3310         // field[1] m.SwIfIndex
3311         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
3312         pos += 4
3313         // field[1] m.QueueID
3314         o.PutUint32(buf[pos:pos+4], uint32(m.QueueID))
3315         pos += 4
3316         // field[1] m.WorkerID
3317         o.PutUint32(buf[pos:pos+4], uint32(m.WorkerID))
3318         pos += 4
3319         // field[1] m.IsMain
3320         if m.IsMain {
3321                 buf[pos] = 1
3322         }
3323         pos += 1
3324         return buf, nil
3325 }
3326 func (m *SwInterfaceSetRxPlacement) Unmarshal(tmp []byte) error {
3327         o := binary.BigEndian
3328         _ = o
3329         pos := 0
3330         _ = pos
3331         // field[1] m.SwIfIndex
3332         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3333         pos += 4
3334         // field[1] m.QueueID
3335         m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
3336         pos += 4
3337         // field[1] m.WorkerID
3338         m.WorkerID = uint32(o.Uint32(tmp[pos : pos+4]))
3339         pos += 4
3340         // field[1] m.IsMain
3341         m.IsMain = tmp[pos] != 0
3342         pos += 1
3343         return nil
3344 }
3345
3346 // SwInterfaceSetRxPlacementReply represents VPP binary API message 'sw_interface_set_rx_placement_reply'.
3347 type SwInterfaceSetRxPlacementReply struct {
3348         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3349 }
3350
3351 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
3352 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
3353         return "sw_interface_set_rx_placement_reply"
3354 }
3355 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string            { return "e8d4e804" }
3356 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3357
3358 func (m *SwInterfaceSetRxPlacementReply) Size() int {
3359         if m == nil {
3360                 return 0
3361         }
3362         var size int
3363         // field[1] m.Retval
3364         size += 4
3365         return size
3366 }
3367 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
3368         o := binary.BigEndian
3369         _ = o
3370         pos := 0
3371         _ = pos
3372         var buf []byte
3373         if b == nil {
3374                 buf = make([]byte, m.Size())
3375         } else {
3376                 buf = b
3377         }
3378         // field[1] m.Retval
3379         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3380         pos += 4
3381         return buf, nil
3382 }
3383 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(tmp []byte) error {
3384         o := binary.BigEndian
3385         _ = o
3386         pos := 0
3387         _ = pos
3388         // field[1] m.Retval
3389         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3390         pos += 4
3391         return nil
3392 }
3393
3394 // SwInterfaceSetTable represents VPP binary API message 'sw_interface_set_table'.
3395 type SwInterfaceSetTable struct {
3396         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3397         IsIPv6    bool           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
3398         VrfID     uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3399 }
3400
3401 func (m *SwInterfaceSetTable) Reset()                        { *m = SwInterfaceSetTable{} }
3402 func (*SwInterfaceSetTable) GetMessageName() string          { return "sw_interface_set_table" }
3403 func (*SwInterfaceSetTable) GetCrcString() string            { return "df42a577" }
3404 func (*SwInterfaceSetTable) GetMessageType() api.MessageType { return api.RequestMessage }
3405
3406 func (m *SwInterfaceSetTable) Size() int {
3407         if m == nil {
3408                 return 0
3409         }
3410         var size int
3411         // field[1] m.SwIfIndex
3412         size += 4
3413         // field[1] m.IsIPv6
3414         size += 1
3415         // field[1] m.VrfID
3416         size += 4
3417         return size
3418 }
3419 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
3420         o := binary.BigEndian
3421         _ = o
3422         pos := 0
3423         _ = pos
3424         var buf []byte
3425         if b == nil {
3426                 buf = make([]byte, m.Size())
3427         } else {
3428                 buf = b
3429         }
3430         // field[1] m.SwIfIndex
3431         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
3432         pos += 4
3433         // field[1] m.IsIPv6
3434         if m.IsIPv6 {
3435                 buf[pos] = 1
3436         }
3437         pos += 1
3438         // field[1] m.VrfID
3439         o.PutUint32(buf[pos:pos+4], uint32(m.VrfID))
3440         pos += 4
3441         return buf, nil
3442 }
3443 func (m *SwInterfaceSetTable) Unmarshal(tmp []byte) error {
3444         o := binary.BigEndian
3445         _ = o
3446         pos := 0
3447         _ = pos
3448         // field[1] m.SwIfIndex
3449         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3450         pos += 4
3451         // field[1] m.IsIPv6
3452         m.IsIPv6 = tmp[pos] != 0
3453         pos += 1
3454         // field[1] m.VrfID
3455         m.VrfID = uint32(o.Uint32(tmp[pos : pos+4]))
3456         pos += 4
3457         return nil
3458 }
3459
3460 // SwInterfaceSetTableReply represents VPP binary API message 'sw_interface_set_table_reply'.
3461 type SwInterfaceSetTableReply struct {
3462         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3463 }
3464
3465 func (m *SwInterfaceSetTableReply) Reset()                        { *m = SwInterfaceSetTableReply{} }
3466 func (*SwInterfaceSetTableReply) GetMessageName() string          { return "sw_interface_set_table_reply" }
3467 func (*SwInterfaceSetTableReply) GetCrcString() string            { return "e8d4e804" }
3468 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3469
3470 func (m *SwInterfaceSetTableReply) Size() int {
3471         if m == nil {
3472                 return 0
3473         }
3474         var size int
3475         // field[1] m.Retval
3476         size += 4
3477         return size
3478 }
3479 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
3480         o := binary.BigEndian
3481         _ = o
3482         pos := 0
3483         _ = pos
3484         var buf []byte
3485         if b == nil {
3486                 buf = make([]byte, m.Size())
3487         } else {
3488                 buf = b
3489         }
3490         // field[1] m.Retval
3491         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3492         pos += 4
3493         return buf, nil
3494 }
3495 func (m *SwInterfaceSetTableReply) Unmarshal(tmp []byte) error {
3496         o := binary.BigEndian
3497         _ = o
3498         pos := 0
3499         _ = pos
3500         // field[1] m.Retval
3501         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3502         pos += 4
3503         return nil
3504 }
3505
3506 // SwInterfaceSetUnnumbered represents VPP binary API message 'sw_interface_set_unnumbered'.
3507 type SwInterfaceSetUnnumbered struct {
3508         SwIfIndex           InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3509         UnnumberedSwIfIndex InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
3510         IsAdd               bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3511 }
3512
3513 func (m *SwInterfaceSetUnnumbered) Reset()                        { *m = SwInterfaceSetUnnumbered{} }
3514 func (*SwInterfaceSetUnnumbered) GetMessageName() string          { return "sw_interface_set_unnumbered" }
3515 func (*SwInterfaceSetUnnumbered) GetCrcString() string            { return "938ef33b" }
3516 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { return api.RequestMessage }
3517
3518 func (m *SwInterfaceSetUnnumbered) Size() int {
3519         if m == nil {
3520                 return 0
3521         }
3522         var size int
3523         // field[1] m.SwIfIndex
3524         size += 4
3525         // field[1] m.UnnumberedSwIfIndex
3526         size += 4
3527         // field[1] m.IsAdd
3528         size += 1
3529         return size
3530 }
3531 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
3532         o := binary.BigEndian
3533         _ = o
3534         pos := 0
3535         _ = pos
3536         var buf []byte
3537         if b == nil {
3538                 buf = make([]byte, m.Size())
3539         } else {
3540                 buf = b
3541         }
3542         // field[1] m.SwIfIndex
3543         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
3544         pos += 4
3545         // field[1] m.UnnumberedSwIfIndex
3546         o.PutUint32(buf[pos:pos+4], uint32(m.UnnumberedSwIfIndex))
3547         pos += 4
3548         // field[1] m.IsAdd
3549         if m.IsAdd {
3550                 buf[pos] = 1
3551         }
3552         pos += 1
3553         return buf, nil
3554 }
3555 func (m *SwInterfaceSetUnnumbered) Unmarshal(tmp []byte) error {
3556         o := binary.BigEndian
3557         _ = o
3558         pos := 0
3559         _ = pos
3560         // field[1] m.SwIfIndex
3561         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3562         pos += 4
3563         // field[1] m.UnnumberedSwIfIndex
3564         m.UnnumberedSwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3565         pos += 4
3566         // field[1] m.IsAdd
3567         m.IsAdd = tmp[pos] != 0
3568         pos += 1
3569         return nil
3570 }
3571
3572 // SwInterfaceSetUnnumberedReply represents VPP binary API message 'sw_interface_set_unnumbered_reply'.
3573 type SwInterfaceSetUnnumberedReply struct {
3574         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3575 }
3576
3577 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
3578 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
3579         return "sw_interface_set_unnumbered_reply"
3580 }
3581 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string            { return "e8d4e804" }
3582 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3583
3584 func (m *SwInterfaceSetUnnumberedReply) Size() int {
3585         if m == nil {
3586                 return 0
3587         }
3588         var size int
3589         // field[1] m.Retval
3590         size += 4
3591         return size
3592 }
3593 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
3594         o := binary.BigEndian
3595         _ = o
3596         pos := 0
3597         _ = pos
3598         var buf []byte
3599         if b == nil {
3600                 buf = make([]byte, m.Size())
3601         } else {
3602                 buf = b
3603         }
3604         // field[1] m.Retval
3605         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3606         pos += 4
3607         return buf, nil
3608 }
3609 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(tmp []byte) error {
3610         o := binary.BigEndian
3611         _ = o
3612         pos := 0
3613         _ = pos
3614         // field[1] m.Retval
3615         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3616         pos += 4
3617         return nil
3618 }
3619
3620 // SwInterfaceTagAddDel represents VPP binary API message 'sw_interface_tag_add_del'.
3621 type SwInterfaceTagAddDel struct {
3622         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3623         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3624         Tag       string         `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
3625 }
3626
3627 func (m *SwInterfaceTagAddDel) Reset()                        { *m = SwInterfaceTagAddDel{} }
3628 func (*SwInterfaceTagAddDel) GetMessageName() string          { return "sw_interface_tag_add_del" }
3629 func (*SwInterfaceTagAddDel) GetCrcString() string            { return "426f8bc1" }
3630 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { return api.RequestMessage }
3631
3632 func (m *SwInterfaceTagAddDel) Size() int {
3633         if m == nil {
3634                 return 0
3635         }
3636         var size int
3637         // field[1] m.IsAdd
3638         size += 1
3639         // field[1] m.SwIfIndex
3640         size += 4
3641         // field[1] m.Tag
3642         size += 64
3643         return size
3644 }
3645 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
3646         o := binary.BigEndian
3647         _ = o
3648         pos := 0
3649         _ = pos
3650         var buf []byte
3651         if b == nil {
3652                 buf = make([]byte, m.Size())
3653         } else {
3654                 buf = b
3655         }
3656         // field[1] m.IsAdd
3657         if m.IsAdd {
3658                 buf[pos] = 1
3659         }
3660         pos += 1
3661         // field[1] m.SwIfIndex
3662         o.PutUint32(buf[pos:pos+4], uint32(m.SwIfIndex))
3663         pos += 4
3664         // field[1] m.Tag
3665         copy(buf[pos:pos+64], m.Tag)
3666         pos += 64
3667         return buf, nil
3668 }
3669 func (m *SwInterfaceTagAddDel) Unmarshal(tmp []byte) error {
3670         o := binary.BigEndian
3671         _ = o
3672         pos := 0
3673         _ = pos
3674         // field[1] m.IsAdd
3675         m.IsAdd = tmp[pos] != 0
3676         pos += 1
3677         // field[1] m.SwIfIndex
3678         m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
3679         pos += 4
3680         // field[1] m.Tag
3681         {
3682                 nul := bytes.Index(tmp[pos:pos+64], []byte{0x00})
3683                 m.Tag = codec.DecodeString(tmp[pos : pos+nul])
3684                 pos += 64
3685         }
3686         return nil
3687 }
3688
3689 // SwInterfaceTagAddDelReply represents VPP binary API message 'sw_interface_tag_add_del_reply'.
3690 type SwInterfaceTagAddDelReply struct {
3691         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3692 }
3693
3694 func (m *SwInterfaceTagAddDelReply) Reset()                        { *m = SwInterfaceTagAddDelReply{} }
3695 func (*SwInterfaceTagAddDelReply) GetMessageName() string          { return "sw_interface_tag_add_del_reply" }
3696 func (*SwInterfaceTagAddDelReply) GetCrcString() string            { return "e8d4e804" }
3697 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3698
3699 func (m *SwInterfaceTagAddDelReply) Size() int {
3700         if m == nil {
3701                 return 0
3702         }
3703         var size int
3704         // field[1] m.Retval
3705         size += 4
3706         return size
3707 }
3708 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
3709         o := binary.BigEndian
3710         _ = o
3711         pos := 0
3712         _ = pos
3713         var buf []byte
3714         if b == nil {
3715                 buf = make([]byte, m.Size())
3716         } else {
3717                 buf = b
3718         }
3719         // field[1] m.Retval
3720         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3721         pos += 4
3722         return buf, nil
3723 }
3724 func (m *SwInterfaceTagAddDelReply) Unmarshal(tmp []byte) error {
3725         o := binary.BigEndian
3726         _ = o
3727         pos := 0
3728         _ = pos
3729         // field[1] m.Retval
3730         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3731         pos += 4
3732         return nil
3733 }
3734
3735 // WantInterfaceEvents represents VPP binary API message 'want_interface_events'.
3736 type WantInterfaceEvents struct {
3737         EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
3738         PID           uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
3739 }
3740
3741 func (m *WantInterfaceEvents) Reset()                        { *m = WantInterfaceEvents{} }
3742 func (*WantInterfaceEvents) GetMessageName() string          { return "want_interface_events" }
3743 func (*WantInterfaceEvents) GetCrcString() string            { return "476f5a08" }
3744 func (*WantInterfaceEvents) GetMessageType() api.MessageType { return api.RequestMessage }
3745
3746 func (m *WantInterfaceEvents) Size() int {
3747         if m == nil {
3748                 return 0
3749         }
3750         var size int
3751         // field[1] m.EnableDisable
3752         size += 4
3753         // field[1] m.PID
3754         size += 4
3755         return size
3756 }
3757 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
3758         o := binary.BigEndian
3759         _ = o
3760         pos := 0
3761         _ = pos
3762         var buf []byte
3763         if b == nil {
3764                 buf = make([]byte, m.Size())
3765         } else {
3766                 buf = b
3767         }
3768         // field[1] m.EnableDisable
3769         o.PutUint32(buf[pos:pos+4], uint32(m.EnableDisable))
3770         pos += 4
3771         // field[1] m.PID
3772         o.PutUint32(buf[pos:pos+4], uint32(m.PID))
3773         pos += 4
3774         return buf, nil
3775 }
3776 func (m *WantInterfaceEvents) Unmarshal(tmp []byte) error {
3777         o := binary.BigEndian
3778         _ = o
3779         pos := 0
3780         _ = pos
3781         // field[1] m.EnableDisable
3782         m.EnableDisable = uint32(o.Uint32(tmp[pos : pos+4]))
3783         pos += 4
3784         // field[1] m.PID
3785         m.PID = uint32(o.Uint32(tmp[pos : pos+4]))
3786         pos += 4
3787         return nil
3788 }
3789
3790 // WantInterfaceEventsReply represents VPP binary API message 'want_interface_events_reply'.
3791 type WantInterfaceEventsReply struct {
3792         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3793 }
3794
3795 func (m *WantInterfaceEventsReply) Reset()                        { *m = WantInterfaceEventsReply{} }
3796 func (*WantInterfaceEventsReply) GetMessageName() string          { return "want_interface_events_reply" }
3797 func (*WantInterfaceEventsReply) GetCrcString() string            { return "e8d4e804" }
3798 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { return api.ReplyMessage }
3799
3800 func (m *WantInterfaceEventsReply) Size() int {
3801         if m == nil {
3802                 return 0
3803         }
3804         var size int
3805         // field[1] m.Retval
3806         size += 4
3807         return size
3808 }
3809 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
3810         o := binary.BigEndian
3811         _ = o
3812         pos := 0
3813         _ = pos
3814         var buf []byte
3815         if b == nil {
3816                 buf = make([]byte, m.Size())
3817         } else {
3818                 buf = b
3819         }
3820         // field[1] m.Retval
3821         o.PutUint32(buf[pos:pos+4], uint32(m.Retval))
3822         pos += 4
3823         return buf, nil
3824 }
3825 func (m *WantInterfaceEventsReply) Unmarshal(tmp []byte) error {
3826         o := binary.BigEndian
3827         _ = o
3828         pos := 0
3829         _ = pos
3830         // field[1] m.Retval
3831         m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
3832         pos += 4
3833         return nil
3834 }
3835
3836 func init() { file_interfaces_binapi_init() }
3837 func file_interfaces_binapi_init() {
3838         api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "interface.CollectDetailedInterfaceStats")
3839         api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "interface.CollectDetailedInterfaceStatsReply")
3840         api.RegisterMessage((*CreateLoopback)(nil), "interface.CreateLoopback")
3841         api.RegisterMessage((*CreateLoopbackInstance)(nil), "interface.CreateLoopbackInstance")
3842         api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "interface.CreateLoopbackInstanceReply")
3843         api.RegisterMessage((*CreateLoopbackReply)(nil), "interface.CreateLoopbackReply")
3844         api.RegisterMessage((*CreateSubif)(nil), "interface.CreateSubif")
3845         api.RegisterMessage((*CreateSubifReply)(nil), "interface.CreateSubifReply")
3846         api.RegisterMessage((*CreateVlanSubif)(nil), "interface.CreateVlanSubif")
3847         api.RegisterMessage((*CreateVlanSubifReply)(nil), "interface.CreateVlanSubifReply")
3848         api.RegisterMessage((*DeleteLoopback)(nil), "interface.DeleteLoopback")
3849         api.RegisterMessage((*DeleteLoopbackReply)(nil), "interface.DeleteLoopbackReply")
3850         api.RegisterMessage((*DeleteSubif)(nil), "interface.DeleteSubif")
3851         api.RegisterMessage((*DeleteSubifReply)(nil), "interface.DeleteSubifReply")
3852         api.RegisterMessage((*HwInterfaceSetMtu)(nil), "interface.HwInterfaceSetMtu")
3853         api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "interface.HwInterfaceSetMtuReply")
3854         api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface.InterfaceNameRenumber")
3855         api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface.InterfaceNameRenumberReply")
3856         api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "interface.SwInterfaceAddDelAddress")
3857         api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "interface.SwInterfaceAddDelAddressReply")
3858         api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "interface.SwInterfaceAddDelMacAddress")
3859         api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "interface.SwInterfaceAddDelMacAddressReply")
3860         api.RegisterMessage((*SwInterfaceClearStats)(nil), "interface.SwInterfaceClearStats")
3861         api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "interface.SwInterfaceClearStatsReply")
3862         api.RegisterMessage((*SwInterfaceDetails)(nil), "interface.SwInterfaceDetails")
3863         api.RegisterMessage((*SwInterfaceDump)(nil), "interface.SwInterfaceDump")
3864         api.RegisterMessage((*SwInterfaceEvent)(nil), "interface.SwInterfaceEvent")
3865         api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "interface.SwInterfaceGetMacAddress")
3866         api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "interface.SwInterfaceGetMacAddressReply")
3867         api.RegisterMessage((*SwInterfaceGetTable)(nil), "interface.SwInterfaceGetTable")
3868         api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "interface.SwInterfaceGetTableReply")
3869         api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "interface.SwInterfaceRxPlacementDetails")
3870         api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "interface.SwInterfaceRxPlacementDump")
3871         api.RegisterMessage((*SwInterfaceSetFlags)(nil), "interface.SwInterfaceSetFlags")
3872         api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "interface.SwInterfaceSetFlagsReply")
3873         api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "interface.SwInterfaceSetIPDirectedBroadcast")
3874         api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "interface.SwInterfaceSetIPDirectedBroadcastReply")
3875         api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "interface.SwInterfaceSetMacAddress")
3876         api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "interface.SwInterfaceSetMacAddressReply")
3877         api.RegisterMessage((*SwInterfaceSetMtu)(nil), "interface.SwInterfaceSetMtu")
3878         api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "interface.SwInterfaceSetMtuReply")
3879         api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "interface.SwInterfaceSetRxMode")
3880         api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "interface.SwInterfaceSetRxModeReply")
3881         api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "interface.SwInterfaceSetRxPlacement")
3882         api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "interface.SwInterfaceSetRxPlacementReply")
3883         api.RegisterMessage((*SwInterfaceSetTable)(nil), "interface.SwInterfaceSetTable")
3884         api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "interface.SwInterfaceSetTableReply")
3885         api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "interface.SwInterfaceSetUnnumbered")
3886         api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "interface.SwInterfaceSetUnnumberedReply")
3887         api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "interface.SwInterfaceTagAddDel")
3888         api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "interface.SwInterfaceTagAddDelReply")
3889         api.RegisterMessage((*WantInterfaceEvents)(nil), "interface.WantInterfaceEvents")
3890         api.RegisterMessage((*WantInterfaceEventsReply)(nil), "interface.WantInterfaceEventsReply")
3891 }
3892
3893 // Messages returns list of all messages in this module.
3894 func AllMessages() []api.Message {
3895         return []api.Message{
3896                 (*CollectDetailedInterfaceStats)(nil),
3897                 (*CollectDetailedInterfaceStatsReply)(nil),
3898                 (*CreateLoopback)(nil),
3899                 (*CreateLoopbackInstance)(nil),
3900                 (*CreateLoopbackInstanceReply)(nil),
3901                 (*CreateLoopbackReply)(nil),
3902                 (*CreateSubif)(nil),
3903                 (*CreateSubifReply)(nil),
3904                 (*CreateVlanSubif)(nil),
3905                 (*CreateVlanSubifReply)(nil),
3906                 (*DeleteLoopback)(nil),
3907                 (*DeleteLoopbackReply)(nil),
3908                 (*DeleteSubif)(nil),
3909                 (*DeleteSubifReply)(nil),
3910                 (*HwInterfaceSetMtu)(nil),
3911                 (*HwInterfaceSetMtuReply)(nil),
3912                 (*InterfaceNameRenumber)(nil),
3913                 (*InterfaceNameRenumberReply)(nil),
3914                 (*SwInterfaceAddDelAddress)(nil),
3915                 (*SwInterfaceAddDelAddressReply)(nil),
3916                 (*SwInterfaceAddDelMacAddress)(nil),
3917                 (*SwInterfaceAddDelMacAddressReply)(nil),
3918                 (*SwInterfaceClearStats)(nil),
3919                 (*SwInterfaceClearStatsReply)(nil),
3920                 (*SwInterfaceDetails)(nil),
3921                 (*SwInterfaceDump)(nil),
3922                 (*SwInterfaceEvent)(nil),
3923                 (*SwInterfaceGetMacAddress)(nil),
3924                 (*SwInterfaceGetMacAddressReply)(nil),
3925                 (*SwInterfaceGetTable)(nil),
3926                 (*SwInterfaceGetTableReply)(nil),
3927                 (*SwInterfaceRxPlacementDetails)(nil),
3928                 (*SwInterfaceRxPlacementDump)(nil),
3929                 (*SwInterfaceSetFlags)(nil),
3930                 (*SwInterfaceSetFlagsReply)(nil),
3931                 (*SwInterfaceSetIPDirectedBroadcast)(nil),
3932                 (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
3933                 (*SwInterfaceSetMacAddress)(nil),
3934                 (*SwInterfaceSetMacAddressReply)(nil),
3935                 (*SwInterfaceSetMtu)(nil),
3936                 (*SwInterfaceSetMtuReply)(nil),
3937                 (*SwInterfaceSetRxMode)(nil),
3938                 (*SwInterfaceSetRxModeReply)(nil),
3939                 (*SwInterfaceSetRxPlacement)(nil),
3940                 (*SwInterfaceSetRxPlacementReply)(nil),
3941                 (*SwInterfaceSetTable)(nil),
3942                 (*SwInterfaceSetTableReply)(nil),
3943                 (*SwInterfaceSetUnnumbered)(nil),
3944                 (*SwInterfaceSetUnnumberedReply)(nil),
3945                 (*SwInterfaceTagAddDel)(nil),
3946                 (*SwInterfaceTagAddDelReply)(nil),
3947                 (*WantInterfaceEvents)(nil),
3948                 (*WantInterfaceEventsReply)(nil),
3949         }
3950 }
3951
3952 // Reference imports to suppress errors if they are not otherwise used.
3953 var _ = api.RegisterMessage
3954 var _ = codec.DecodeString
3955 var _ = bytes.NewBuffer
3956 var _ = context.Background
3957 var _ = io.Copy
3958 var _ = strconv.Itoa
3959 var _ = struc.Pack
3960 var _ = binary.BigEndian
3961 var _ = math.Float32bits