Improve binapi generator
[govpp.git] / binapi / interface / interface.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/core/interface.api.json
6
7 // Package interfaces contains generated bindings for API file interface.api.
8 //
9 // Contents:
10 //  57 messages
11 //
12 package interfaces
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
17         interface_types "git.fd.io/govpp.git/binapi/interface_types"
18         ip_types "git.fd.io/govpp.git/binapi/ip_types"
19         codec "git.fd.io/govpp.git/codec"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 const (
29         APIFile    = "interface"
30         APIVersion = "3.2.2"
31         VersionCrc = 0x58d4cf5a
32 )
33
34 // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
35 type CollectDetailedInterfaceStats struct {
36         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
37         EnableDisable bool                           `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
38 }
39
40 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
41 func (*CollectDetailedInterfaceStats) GetMessageName() string {
42         return "collect_detailed_interface_stats"
43 }
44 func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
45 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType {
46         return api.RequestMessage
47 }
48
49 func (m *CollectDetailedInterfaceStats) Size() int {
50         if m == nil {
51                 return 0
52         }
53         var size int
54         size += 4 // m.SwIfIndex
55         size += 1 // m.EnableDisable
56         return size
57 }
58 func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
59         var buf *codec.Buffer
60         if b == nil {
61                 buf = codec.NewBuffer(make([]byte, m.Size()))
62         } else {
63                 buf = codec.NewBuffer(b)
64         }
65         buf.EncodeUint32(uint32(m.SwIfIndex))
66         buf.EncodeBool(m.EnableDisable)
67         return buf.Bytes(), nil
68 }
69 func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error {
70         buf := codec.NewBuffer(b)
71         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
72         m.EnableDisable = buf.DecodeBool()
73         return nil
74 }
75
76 // CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'.
77 type CollectDetailedInterfaceStatsReply struct {
78         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
79 }
80
81 func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
82 func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
83         return "collect_detailed_interface_stats_reply"
84 }
85 func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" }
86 func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType {
87         return api.ReplyMessage
88 }
89
90 func (m *CollectDetailedInterfaceStatsReply) Size() int {
91         if m == nil {
92                 return 0
93         }
94         var size int
95         size += 4 // m.Retval
96         return size
97 }
98 func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) {
99         var buf *codec.Buffer
100         if b == nil {
101                 buf = codec.NewBuffer(make([]byte, m.Size()))
102         } else {
103                 buf = codec.NewBuffer(b)
104         }
105         buf.EncodeUint32(uint32(m.Retval))
106         return buf.Bytes(), nil
107 }
108 func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error {
109         buf := codec.NewBuffer(b)
110         m.Retval = int32(buf.DecodeUint32())
111         return nil
112 }
113
114 // CreateLoopback defines message 'create_loopback'.
115 type CreateLoopback struct {
116         MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
117 }
118
119 func (m *CreateLoopback) Reset()               { *m = CreateLoopback{} }
120 func (*CreateLoopback) GetMessageName() string { return "create_loopback" }
121 func (*CreateLoopback) GetCrcString() string   { return "42bb5d22" }
122 func (*CreateLoopback) GetMessageType() api.MessageType {
123         return api.RequestMessage
124 }
125
126 func (m *CreateLoopback) Size() int {
127         if m == nil {
128                 return 0
129         }
130         var size int
131         size += 1 * 6 // m.MacAddress
132         return size
133 }
134 func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
135         var buf *codec.Buffer
136         if b == nil {
137                 buf = codec.NewBuffer(make([]byte, m.Size()))
138         } else {
139                 buf = codec.NewBuffer(b)
140         }
141         buf.EncodeBytes(m.MacAddress[:], 6)
142         return buf.Bytes(), nil
143 }
144 func (m *CreateLoopback) Unmarshal(b []byte) error {
145         buf := codec.NewBuffer(b)
146         copy(m.MacAddress[:], buf.DecodeBytes(6))
147         return nil
148 }
149
150 // CreateLoopbackInstance defines message 'create_loopback_instance'.
151 type CreateLoopbackInstance struct {
152         MacAddress   ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
153         IsSpecified  bool                      `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
154         UserInstance uint32                    `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
155 }
156
157 func (m *CreateLoopbackInstance) Reset()               { *m = CreateLoopbackInstance{} }
158 func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" }
159 func (*CreateLoopbackInstance) GetCrcString() string   { return "d36a3ee2" }
160 func (*CreateLoopbackInstance) GetMessageType() api.MessageType {
161         return api.RequestMessage
162 }
163
164 func (m *CreateLoopbackInstance) Size() int {
165         if m == nil {
166                 return 0
167         }
168         var size int
169         size += 1 * 6 // m.MacAddress
170         size += 1     // m.IsSpecified
171         size += 4     // m.UserInstance
172         return size
173 }
174 func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
175         var buf *codec.Buffer
176         if b == nil {
177                 buf = codec.NewBuffer(make([]byte, m.Size()))
178         } else {
179                 buf = codec.NewBuffer(b)
180         }
181         buf.EncodeBytes(m.MacAddress[:], 6)
182         buf.EncodeBool(m.IsSpecified)
183         buf.EncodeUint32(uint32(m.UserInstance))
184         return buf.Bytes(), nil
185 }
186 func (m *CreateLoopbackInstance) Unmarshal(b []byte) error {
187         buf := codec.NewBuffer(b)
188         copy(m.MacAddress[:], buf.DecodeBytes(6))
189         m.IsSpecified = buf.DecodeBool()
190         m.UserInstance = buf.DecodeUint32()
191         return nil
192 }
193
194 // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'.
195 type CreateLoopbackInstanceReply struct {
196         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
197         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
198 }
199
200 func (m *CreateLoopbackInstanceReply) Reset()               { *m = CreateLoopbackInstanceReply{} }
201 func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" }
202 func (*CreateLoopbackInstanceReply) GetCrcString() string   { return "5383d31f" }
203 func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType {
204         return api.ReplyMessage
205 }
206
207 func (m *CreateLoopbackInstanceReply) Size() int {
208         if m == nil {
209                 return 0
210         }
211         var size int
212         size += 4 // m.Retval
213         size += 4 // m.SwIfIndex
214         return size
215 }
216 func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) {
217         var buf *codec.Buffer
218         if b == nil {
219                 buf = codec.NewBuffer(make([]byte, m.Size()))
220         } else {
221                 buf = codec.NewBuffer(b)
222         }
223         buf.EncodeUint32(uint32(m.Retval))
224         buf.EncodeUint32(uint32(m.SwIfIndex))
225         return buf.Bytes(), nil
226 }
227 func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error {
228         buf := codec.NewBuffer(b)
229         m.Retval = int32(buf.DecodeUint32())
230         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
231         return nil
232 }
233
234 // CreateLoopbackReply defines message 'create_loopback_reply'.
235 type CreateLoopbackReply struct {
236         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
237         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
238 }
239
240 func (m *CreateLoopbackReply) Reset()               { *m = CreateLoopbackReply{} }
241 func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" }
242 func (*CreateLoopbackReply) GetCrcString() string   { return "5383d31f" }
243 func (*CreateLoopbackReply) GetMessageType() api.MessageType {
244         return api.ReplyMessage
245 }
246
247 func (m *CreateLoopbackReply) Size() int {
248         if m == nil {
249                 return 0
250         }
251         var size int
252         size += 4 // m.Retval
253         size += 4 // m.SwIfIndex
254         return size
255 }
256 func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) {
257         var buf *codec.Buffer
258         if b == nil {
259                 buf = codec.NewBuffer(make([]byte, m.Size()))
260         } else {
261                 buf = codec.NewBuffer(b)
262         }
263         buf.EncodeUint32(uint32(m.Retval))
264         buf.EncodeUint32(uint32(m.SwIfIndex))
265         return buf.Bytes(), nil
266 }
267 func (m *CreateLoopbackReply) Unmarshal(b []byte) error {
268         buf := codec.NewBuffer(b)
269         m.Retval = int32(buf.DecodeUint32())
270         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
271         return nil
272 }
273
274 // CreateSubif defines message 'create_subif'.
275 type CreateSubif struct {
276         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
277         SubID       uint32                         `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
278         SubIfFlags  interface_types.SubIfFlags     `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
279         OuterVlanID uint16                         `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
280         InnerVlanID uint16                         `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
281 }
282
283 func (m *CreateSubif) Reset()               { *m = CreateSubif{} }
284 func (*CreateSubif) GetMessageName() string { return "create_subif" }
285 func (*CreateSubif) GetCrcString() string   { return "cb371063" }
286 func (*CreateSubif) GetMessageType() api.MessageType {
287         return api.RequestMessage
288 }
289
290 func (m *CreateSubif) Size() int {
291         if m == nil {
292                 return 0
293         }
294         var size int
295         size += 4 // m.SwIfIndex
296         size += 4 // m.SubID
297         size += 4 // m.SubIfFlags
298         size += 2 // m.OuterVlanID
299         size += 2 // m.InnerVlanID
300         return size
301 }
302 func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
303         var buf *codec.Buffer
304         if b == nil {
305                 buf = codec.NewBuffer(make([]byte, m.Size()))
306         } else {
307                 buf = codec.NewBuffer(b)
308         }
309         buf.EncodeUint32(uint32(m.SwIfIndex))
310         buf.EncodeUint32(uint32(m.SubID))
311         buf.EncodeUint32(uint32(m.SubIfFlags))
312         buf.EncodeUint16(uint16(m.OuterVlanID))
313         buf.EncodeUint16(uint16(m.InnerVlanID))
314         return buf.Bytes(), nil
315 }
316 func (m *CreateSubif) Unmarshal(b []byte) error {
317         buf := codec.NewBuffer(b)
318         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
319         m.SubID = buf.DecodeUint32()
320         m.SubIfFlags = interface_types.SubIfFlags(buf.DecodeUint32())
321         m.OuterVlanID = buf.DecodeUint16()
322         m.InnerVlanID = buf.DecodeUint16()
323         return nil
324 }
325
326 // CreateSubifReply defines message 'create_subif_reply'.
327 type CreateSubifReply struct {
328         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
329         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
330 }
331
332 func (m *CreateSubifReply) Reset()               { *m = CreateSubifReply{} }
333 func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" }
334 func (*CreateSubifReply) GetCrcString() string   { return "5383d31f" }
335 func (*CreateSubifReply) GetMessageType() api.MessageType {
336         return api.ReplyMessage
337 }
338
339 func (m *CreateSubifReply) Size() int {
340         if m == nil {
341                 return 0
342         }
343         var size int
344         size += 4 // m.Retval
345         size += 4 // m.SwIfIndex
346         return size
347 }
348 func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) {
349         var buf *codec.Buffer
350         if b == nil {
351                 buf = codec.NewBuffer(make([]byte, m.Size()))
352         } else {
353                 buf = codec.NewBuffer(b)
354         }
355         buf.EncodeUint32(uint32(m.Retval))
356         buf.EncodeUint32(uint32(m.SwIfIndex))
357         return buf.Bytes(), nil
358 }
359 func (m *CreateSubifReply) Unmarshal(b []byte) error {
360         buf := codec.NewBuffer(b)
361         m.Retval = int32(buf.DecodeUint32())
362         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
363         return nil
364 }
365
366 // CreateVlanSubif defines message 'create_vlan_subif'.
367 type CreateVlanSubif struct {
368         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
369         VlanID    uint32                         `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
370 }
371
372 func (m *CreateVlanSubif) Reset()               { *m = CreateVlanSubif{} }
373 func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" }
374 func (*CreateVlanSubif) GetCrcString() string   { return "af34ac8b" }
375 func (*CreateVlanSubif) GetMessageType() api.MessageType {
376         return api.RequestMessage
377 }
378
379 func (m *CreateVlanSubif) Size() int {
380         if m == nil {
381                 return 0
382         }
383         var size int
384         size += 4 // m.SwIfIndex
385         size += 4 // m.VlanID
386         return size
387 }
388 func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
389         var buf *codec.Buffer
390         if b == nil {
391                 buf = codec.NewBuffer(make([]byte, m.Size()))
392         } else {
393                 buf = codec.NewBuffer(b)
394         }
395         buf.EncodeUint32(uint32(m.SwIfIndex))
396         buf.EncodeUint32(uint32(m.VlanID))
397         return buf.Bytes(), nil
398 }
399 func (m *CreateVlanSubif) Unmarshal(b []byte) error {
400         buf := codec.NewBuffer(b)
401         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
402         m.VlanID = buf.DecodeUint32()
403         return nil
404 }
405
406 // CreateVlanSubifReply defines message 'create_vlan_subif_reply'.
407 type CreateVlanSubifReply struct {
408         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
409         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
410 }
411
412 func (m *CreateVlanSubifReply) Reset()               { *m = CreateVlanSubifReply{} }
413 func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" }
414 func (*CreateVlanSubifReply) GetCrcString() string   { return "5383d31f" }
415 func (*CreateVlanSubifReply) GetMessageType() api.MessageType {
416         return api.ReplyMessage
417 }
418
419 func (m *CreateVlanSubifReply) Size() int {
420         if m == nil {
421                 return 0
422         }
423         var size int
424         size += 4 // m.Retval
425         size += 4 // m.SwIfIndex
426         return size
427 }
428 func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) {
429         var buf *codec.Buffer
430         if b == nil {
431                 buf = codec.NewBuffer(make([]byte, m.Size()))
432         } else {
433                 buf = codec.NewBuffer(b)
434         }
435         buf.EncodeUint32(uint32(m.Retval))
436         buf.EncodeUint32(uint32(m.SwIfIndex))
437         return buf.Bytes(), nil
438 }
439 func (m *CreateVlanSubifReply) Unmarshal(b []byte) error {
440         buf := codec.NewBuffer(b)
441         m.Retval = int32(buf.DecodeUint32())
442         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
443         return nil
444 }
445
446 // DeleteLoopback defines message 'delete_loopback'.
447 type DeleteLoopback struct {
448         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
449 }
450
451 func (m *DeleteLoopback) Reset()               { *m = DeleteLoopback{} }
452 func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" }
453 func (*DeleteLoopback) GetCrcString() string   { return "f9e6675e" }
454 func (*DeleteLoopback) GetMessageType() api.MessageType {
455         return api.RequestMessage
456 }
457
458 func (m *DeleteLoopback) Size() int {
459         if m == nil {
460                 return 0
461         }
462         var size int
463         size += 4 // m.SwIfIndex
464         return size
465 }
466 func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) {
467         var buf *codec.Buffer
468         if b == nil {
469                 buf = codec.NewBuffer(make([]byte, m.Size()))
470         } else {
471                 buf = codec.NewBuffer(b)
472         }
473         buf.EncodeUint32(uint32(m.SwIfIndex))
474         return buf.Bytes(), nil
475 }
476 func (m *DeleteLoopback) Unmarshal(b []byte) error {
477         buf := codec.NewBuffer(b)
478         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
479         return nil
480 }
481
482 // DeleteLoopbackReply defines message 'delete_loopback_reply'.
483 type DeleteLoopbackReply struct {
484         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
485 }
486
487 func (m *DeleteLoopbackReply) Reset()               { *m = DeleteLoopbackReply{} }
488 func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" }
489 func (*DeleteLoopbackReply) GetCrcString() string   { return "e8d4e804" }
490 func (*DeleteLoopbackReply) GetMessageType() api.MessageType {
491         return api.ReplyMessage
492 }
493
494 func (m *DeleteLoopbackReply) Size() int {
495         if m == nil {
496                 return 0
497         }
498         var size int
499         size += 4 // m.Retval
500         return size
501 }
502 func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) {
503         var buf *codec.Buffer
504         if b == nil {
505                 buf = codec.NewBuffer(make([]byte, m.Size()))
506         } else {
507                 buf = codec.NewBuffer(b)
508         }
509         buf.EncodeUint32(uint32(m.Retval))
510         return buf.Bytes(), nil
511 }
512 func (m *DeleteLoopbackReply) Unmarshal(b []byte) error {
513         buf := codec.NewBuffer(b)
514         m.Retval = int32(buf.DecodeUint32())
515         return nil
516 }
517
518 // DeleteSubif defines message 'delete_subif'.
519 type DeleteSubif struct {
520         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
521 }
522
523 func (m *DeleteSubif) Reset()               { *m = DeleteSubif{} }
524 func (*DeleteSubif) GetMessageName() string { return "delete_subif" }
525 func (*DeleteSubif) GetCrcString() string   { return "f9e6675e" }
526 func (*DeleteSubif) GetMessageType() api.MessageType {
527         return api.RequestMessage
528 }
529
530 func (m *DeleteSubif) Size() int {
531         if m == nil {
532                 return 0
533         }
534         var size int
535         size += 4 // m.SwIfIndex
536         return size
537 }
538 func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) {
539         var buf *codec.Buffer
540         if b == nil {
541                 buf = codec.NewBuffer(make([]byte, m.Size()))
542         } else {
543                 buf = codec.NewBuffer(b)
544         }
545         buf.EncodeUint32(uint32(m.SwIfIndex))
546         return buf.Bytes(), nil
547 }
548 func (m *DeleteSubif) Unmarshal(b []byte) error {
549         buf := codec.NewBuffer(b)
550         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
551         return nil
552 }
553
554 // DeleteSubifReply defines message 'delete_subif_reply'.
555 type DeleteSubifReply struct {
556         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
557 }
558
559 func (m *DeleteSubifReply) Reset()               { *m = DeleteSubifReply{} }
560 func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" }
561 func (*DeleteSubifReply) GetCrcString() string   { return "e8d4e804" }
562 func (*DeleteSubifReply) GetMessageType() api.MessageType {
563         return api.ReplyMessage
564 }
565
566 func (m *DeleteSubifReply) Size() int {
567         if m == nil {
568                 return 0
569         }
570         var size int
571         size += 4 // m.Retval
572         return size
573 }
574 func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) {
575         var buf *codec.Buffer
576         if b == nil {
577                 buf = codec.NewBuffer(make([]byte, m.Size()))
578         } else {
579                 buf = codec.NewBuffer(b)
580         }
581         buf.EncodeUint32(uint32(m.Retval))
582         return buf.Bytes(), nil
583 }
584 func (m *DeleteSubifReply) Unmarshal(b []byte) error {
585         buf := codec.NewBuffer(b)
586         m.Retval = int32(buf.DecodeUint32())
587         return nil
588 }
589
590 // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'.
591 type HwInterfaceSetMtu struct {
592         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
593         Mtu       uint16                         `binapi:"u16,name=mtu" json:"mtu,omitempty"`
594 }
595
596 func (m *HwInterfaceSetMtu) Reset()               { *m = HwInterfaceSetMtu{} }
597 func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" }
598 func (*HwInterfaceSetMtu) GetCrcString() string   { return "e6746899" }
599 func (*HwInterfaceSetMtu) GetMessageType() api.MessageType {
600         return api.RequestMessage
601 }
602
603 func (m *HwInterfaceSetMtu) Size() int {
604         if m == nil {
605                 return 0
606         }
607         var size int
608         size += 4 // m.SwIfIndex
609         size += 2 // m.Mtu
610         return size
611 }
612 func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
613         var buf *codec.Buffer
614         if b == nil {
615                 buf = codec.NewBuffer(make([]byte, m.Size()))
616         } else {
617                 buf = codec.NewBuffer(b)
618         }
619         buf.EncodeUint32(uint32(m.SwIfIndex))
620         buf.EncodeUint16(uint16(m.Mtu))
621         return buf.Bytes(), nil
622 }
623 func (m *HwInterfaceSetMtu) Unmarshal(b []byte) error {
624         buf := codec.NewBuffer(b)
625         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
626         m.Mtu = buf.DecodeUint16()
627         return nil
628 }
629
630 // HwInterfaceSetMtuReply defines message 'hw_interface_set_mtu_reply'.
631 type HwInterfaceSetMtuReply struct {
632         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
633 }
634
635 func (m *HwInterfaceSetMtuReply) Reset()               { *m = HwInterfaceSetMtuReply{} }
636 func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" }
637 func (*HwInterfaceSetMtuReply) GetCrcString() string   { return "e8d4e804" }
638 func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType {
639         return api.ReplyMessage
640 }
641
642 func (m *HwInterfaceSetMtuReply) Size() int {
643         if m == nil {
644                 return 0
645         }
646         var size int
647         size += 4 // m.Retval
648         return size
649 }
650 func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
651         var buf *codec.Buffer
652         if b == nil {
653                 buf = codec.NewBuffer(make([]byte, m.Size()))
654         } else {
655                 buf = codec.NewBuffer(b)
656         }
657         buf.EncodeUint32(uint32(m.Retval))
658         return buf.Bytes(), nil
659 }
660 func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error {
661         buf := codec.NewBuffer(b)
662         m.Retval = int32(buf.DecodeUint32())
663         return nil
664 }
665
666 // InterfaceNameRenumber defines message 'interface_name_renumber'.
667 type InterfaceNameRenumber struct {
668         SwIfIndex          interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
669         NewShowDevInstance uint32                         `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
670 }
671
672 func (m *InterfaceNameRenumber) Reset()               { *m = InterfaceNameRenumber{} }
673 func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" }
674 func (*InterfaceNameRenumber) GetCrcString() string   { return "2b8858b8" }
675 func (*InterfaceNameRenumber) GetMessageType() api.MessageType {
676         return api.RequestMessage
677 }
678
679 func (m *InterfaceNameRenumber) Size() int {
680         if m == nil {
681                 return 0
682         }
683         var size int
684         size += 4 // m.SwIfIndex
685         size += 4 // m.NewShowDevInstance
686         return size
687 }
688 func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
689         var buf *codec.Buffer
690         if b == nil {
691                 buf = codec.NewBuffer(make([]byte, m.Size()))
692         } else {
693                 buf = codec.NewBuffer(b)
694         }
695         buf.EncodeUint32(uint32(m.SwIfIndex))
696         buf.EncodeUint32(uint32(m.NewShowDevInstance))
697         return buf.Bytes(), nil
698 }
699 func (m *InterfaceNameRenumber) Unmarshal(b []byte) error {
700         buf := codec.NewBuffer(b)
701         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
702         m.NewShowDevInstance = buf.DecodeUint32()
703         return nil
704 }
705
706 // InterfaceNameRenumberReply defines message 'interface_name_renumber_reply'.
707 type InterfaceNameRenumberReply struct {
708         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
709 }
710
711 func (m *InterfaceNameRenumberReply) Reset()               { *m = InterfaceNameRenumberReply{} }
712 func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" }
713 func (*InterfaceNameRenumberReply) GetCrcString() string   { return "e8d4e804" }
714 func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType {
715         return api.ReplyMessage
716 }
717
718 func (m *InterfaceNameRenumberReply) Size() int {
719         if m == nil {
720                 return 0
721         }
722         var size int
723         size += 4 // m.Retval
724         return size
725 }
726 func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) {
727         var buf *codec.Buffer
728         if b == nil {
729                 buf = codec.NewBuffer(make([]byte, m.Size()))
730         } else {
731                 buf = codec.NewBuffer(b)
732         }
733         buf.EncodeUint32(uint32(m.Retval))
734         return buf.Bytes(), nil
735 }
736 func (m *InterfaceNameRenumberReply) Unmarshal(b []byte) error {
737         buf := codec.NewBuffer(b)
738         m.Retval = int32(buf.DecodeUint32())
739         return nil
740 }
741
742 // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'.
743 type SwInterfaceAddDelAddress struct {
744         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
745         IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
746         DelAll    bool                           `binapi:"bool,name=del_all" json:"del_all,omitempty"`
747         Prefix    ip_types.AddressWithPrefix     `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
748 }
749
750 func (m *SwInterfaceAddDelAddress) Reset()               { *m = SwInterfaceAddDelAddress{} }
751 func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" }
752 func (*SwInterfaceAddDelAddress) GetCrcString() string   { return "5803d5c4" }
753 func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType {
754         return api.RequestMessage
755 }
756
757 func (m *SwInterfaceAddDelAddress) Size() int {
758         if m == nil {
759                 return 0
760         }
761         var size int
762         size += 4      // m.SwIfIndex
763         size += 1      // m.IsAdd
764         size += 1      // m.DelAll
765         size += 1      // m.Prefix.Address.Af
766         size += 1 * 16 // m.Prefix.Address.Un
767         size += 1      // m.Prefix.Len
768         return size
769 }
770 func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) {
771         var buf *codec.Buffer
772         if b == nil {
773                 buf = codec.NewBuffer(make([]byte, m.Size()))
774         } else {
775                 buf = codec.NewBuffer(b)
776         }
777         buf.EncodeUint32(uint32(m.SwIfIndex))
778         buf.EncodeBool(m.IsAdd)
779         buf.EncodeBool(m.DelAll)
780         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
781         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
782         buf.EncodeUint8(uint8(m.Prefix.Len))
783         return buf.Bytes(), nil
784 }
785 func (m *SwInterfaceAddDelAddress) Unmarshal(b []byte) error {
786         buf := codec.NewBuffer(b)
787         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
788         m.IsAdd = buf.DecodeBool()
789         m.DelAll = buf.DecodeBool()
790         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
791         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
792         m.Prefix.Len = buf.DecodeUint8()
793         return nil
794 }
795
796 // SwInterfaceAddDelAddressReply defines message 'sw_interface_add_del_address_reply'.
797 type SwInterfaceAddDelAddressReply struct {
798         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
799 }
800
801 func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
802 func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
803         return "sw_interface_add_del_address_reply"
804 }
805 func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" }
806 func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType {
807         return api.ReplyMessage
808 }
809
810 func (m *SwInterfaceAddDelAddressReply) Size() int {
811         if m == nil {
812                 return 0
813         }
814         var size int
815         size += 4 // m.Retval
816         return size
817 }
818 func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) {
819         var buf *codec.Buffer
820         if b == nil {
821                 buf = codec.NewBuffer(make([]byte, m.Size()))
822         } else {
823                 buf = codec.NewBuffer(b)
824         }
825         buf.EncodeUint32(uint32(m.Retval))
826         return buf.Bytes(), nil
827 }
828 func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error {
829         buf := codec.NewBuffer(b)
830         m.Retval = int32(buf.DecodeUint32())
831         return nil
832 }
833
834 // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'.
835 type SwInterfaceAddDelMacAddress struct {
836         SwIfIndex uint32                    `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
837         Addr      ethernet_types.MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
838         IsAdd     uint8                     `binapi:"u8,name=is_add" json:"is_add,omitempty"`
839 }
840
841 func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
842 func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
843         return "sw_interface_add_del_mac_address"
844 }
845 func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" }
846 func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType {
847         return api.RequestMessage
848 }
849
850 func (m *SwInterfaceAddDelMacAddress) Size() int {
851         if m == nil {
852                 return 0
853         }
854         var size int
855         size += 4     // m.SwIfIndex
856         size += 1 * 6 // m.Addr
857         size += 1     // m.IsAdd
858         return size
859 }
860 func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
861         var buf *codec.Buffer
862         if b == nil {
863                 buf = codec.NewBuffer(make([]byte, m.Size()))
864         } else {
865                 buf = codec.NewBuffer(b)
866         }
867         buf.EncodeUint32(uint32(m.SwIfIndex))
868         buf.EncodeBytes(m.Addr[:], 6)
869         buf.EncodeUint8(uint8(m.IsAdd))
870         return buf.Bytes(), nil
871 }
872 func (m *SwInterfaceAddDelMacAddress) Unmarshal(b []byte) error {
873         buf := codec.NewBuffer(b)
874         m.SwIfIndex = buf.DecodeUint32()
875         copy(m.Addr[:], buf.DecodeBytes(6))
876         m.IsAdd = buf.DecodeUint8()
877         return nil
878 }
879
880 // SwInterfaceAddDelMacAddressReply defines message 'sw_interface_add_del_mac_address_reply'.
881 type SwInterfaceAddDelMacAddressReply struct {
882         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
883 }
884
885 func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
886 func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
887         return "sw_interface_add_del_mac_address_reply"
888 }
889 func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" }
890 func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType {
891         return api.ReplyMessage
892 }
893
894 func (m *SwInterfaceAddDelMacAddressReply) Size() int {
895         if m == nil {
896                 return 0
897         }
898         var size int
899         size += 4 // m.Retval
900         return size
901 }
902 func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) {
903         var buf *codec.Buffer
904         if b == nil {
905                 buf = codec.NewBuffer(make([]byte, m.Size()))
906         } else {
907                 buf = codec.NewBuffer(b)
908         }
909         buf.EncodeUint32(uint32(m.Retval))
910         return buf.Bytes(), nil
911 }
912 func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error {
913         buf := codec.NewBuffer(b)
914         m.Retval = int32(buf.DecodeUint32())
915         return nil
916 }
917
918 // SwInterfaceAddressReplaceBegin defines message 'sw_interface_address_replace_begin'.
919 type SwInterfaceAddressReplaceBegin struct{}
920
921 func (m *SwInterfaceAddressReplaceBegin) Reset() { *m = SwInterfaceAddressReplaceBegin{} }
922 func (*SwInterfaceAddressReplaceBegin) GetMessageName() string {
923         return "sw_interface_address_replace_begin"
924 }
925 func (*SwInterfaceAddressReplaceBegin) GetCrcString() string { return "51077d14" }
926 func (*SwInterfaceAddressReplaceBegin) GetMessageType() api.MessageType {
927         return api.RequestMessage
928 }
929
930 func (m *SwInterfaceAddressReplaceBegin) Size() int {
931         if m == nil {
932                 return 0
933         }
934         var size int
935         return size
936 }
937 func (m *SwInterfaceAddressReplaceBegin) Marshal(b []byte) ([]byte, error) {
938         var buf *codec.Buffer
939         if b == nil {
940                 buf = codec.NewBuffer(make([]byte, m.Size()))
941         } else {
942                 buf = codec.NewBuffer(b)
943         }
944         return buf.Bytes(), nil
945 }
946 func (m *SwInterfaceAddressReplaceBegin) Unmarshal(b []byte) error {
947         return nil
948 }
949
950 // SwInterfaceAddressReplaceBeginReply defines message 'sw_interface_address_replace_begin_reply'.
951 type SwInterfaceAddressReplaceBeginReply struct {
952         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
953 }
954
955 func (m *SwInterfaceAddressReplaceBeginReply) Reset() { *m = SwInterfaceAddressReplaceBeginReply{} }
956 func (*SwInterfaceAddressReplaceBeginReply) GetMessageName() string {
957         return "sw_interface_address_replace_begin_reply"
958 }
959 func (*SwInterfaceAddressReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
960 func (*SwInterfaceAddressReplaceBeginReply) GetMessageType() api.MessageType {
961         return api.ReplyMessage
962 }
963
964 func (m *SwInterfaceAddressReplaceBeginReply) Size() int {
965         if m == nil {
966                 return 0
967         }
968         var size int
969         size += 4 // m.Retval
970         return size
971 }
972 func (m *SwInterfaceAddressReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
973         var buf *codec.Buffer
974         if b == nil {
975                 buf = codec.NewBuffer(make([]byte, m.Size()))
976         } else {
977                 buf = codec.NewBuffer(b)
978         }
979         buf.EncodeUint32(uint32(m.Retval))
980         return buf.Bytes(), nil
981 }
982 func (m *SwInterfaceAddressReplaceBeginReply) Unmarshal(b []byte) error {
983         buf := codec.NewBuffer(b)
984         m.Retval = int32(buf.DecodeUint32())
985         return nil
986 }
987
988 // SwInterfaceAddressReplaceEnd defines message 'sw_interface_address_replace_end'.
989 type SwInterfaceAddressReplaceEnd struct{}
990
991 func (m *SwInterfaceAddressReplaceEnd) Reset() { *m = SwInterfaceAddressReplaceEnd{} }
992 func (*SwInterfaceAddressReplaceEnd) GetMessageName() string {
993         return "sw_interface_address_replace_end"
994 }
995 func (*SwInterfaceAddressReplaceEnd) GetCrcString() string { return "51077d14" }
996 func (*SwInterfaceAddressReplaceEnd) GetMessageType() api.MessageType {
997         return api.RequestMessage
998 }
999
1000 func (m *SwInterfaceAddressReplaceEnd) Size() int {
1001         if m == nil {
1002                 return 0
1003         }
1004         var size int
1005         return size
1006 }
1007 func (m *SwInterfaceAddressReplaceEnd) Marshal(b []byte) ([]byte, error) {
1008         var buf *codec.Buffer
1009         if b == nil {
1010                 buf = codec.NewBuffer(make([]byte, m.Size()))
1011         } else {
1012                 buf = codec.NewBuffer(b)
1013         }
1014         return buf.Bytes(), nil
1015 }
1016 func (m *SwInterfaceAddressReplaceEnd) Unmarshal(b []byte) error {
1017         return nil
1018 }
1019
1020 // SwInterfaceAddressReplaceEndReply defines message 'sw_interface_address_replace_end_reply'.
1021 type SwInterfaceAddressReplaceEndReply struct {
1022         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1023 }
1024
1025 func (m *SwInterfaceAddressReplaceEndReply) Reset() { *m = SwInterfaceAddressReplaceEndReply{} }
1026 func (*SwInterfaceAddressReplaceEndReply) GetMessageName() string {
1027         return "sw_interface_address_replace_end_reply"
1028 }
1029 func (*SwInterfaceAddressReplaceEndReply) GetCrcString() string { return "e8d4e804" }
1030 func (*SwInterfaceAddressReplaceEndReply) GetMessageType() api.MessageType {
1031         return api.ReplyMessage
1032 }
1033
1034 func (m *SwInterfaceAddressReplaceEndReply) Size() int {
1035         if m == nil {
1036                 return 0
1037         }
1038         var size int
1039         size += 4 // m.Retval
1040         return size
1041 }
1042 func (m *SwInterfaceAddressReplaceEndReply) Marshal(b []byte) ([]byte, error) {
1043         var buf *codec.Buffer
1044         if b == nil {
1045                 buf = codec.NewBuffer(make([]byte, m.Size()))
1046         } else {
1047                 buf = codec.NewBuffer(b)
1048         }
1049         buf.EncodeUint32(uint32(m.Retval))
1050         return buf.Bytes(), nil
1051 }
1052 func (m *SwInterfaceAddressReplaceEndReply) Unmarshal(b []byte) error {
1053         buf := codec.NewBuffer(b)
1054         m.Retval = int32(buf.DecodeUint32())
1055         return nil
1056 }
1057
1058 // SwInterfaceClearStats defines message 'sw_interface_clear_stats'.
1059 type SwInterfaceClearStats struct {
1060         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1061 }
1062
1063 func (m *SwInterfaceClearStats) Reset()               { *m = SwInterfaceClearStats{} }
1064 func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" }
1065 func (*SwInterfaceClearStats) GetCrcString() string   { return "f9e6675e" }
1066 func (*SwInterfaceClearStats) GetMessageType() api.MessageType {
1067         return api.RequestMessage
1068 }
1069
1070 func (m *SwInterfaceClearStats) Size() int {
1071         if m == nil {
1072                 return 0
1073         }
1074         var size int
1075         size += 4 // m.SwIfIndex
1076         return size
1077 }
1078 func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) {
1079         var buf *codec.Buffer
1080         if b == nil {
1081                 buf = codec.NewBuffer(make([]byte, m.Size()))
1082         } else {
1083                 buf = codec.NewBuffer(b)
1084         }
1085         buf.EncodeUint32(uint32(m.SwIfIndex))
1086         return buf.Bytes(), nil
1087 }
1088 func (m *SwInterfaceClearStats) Unmarshal(b []byte) error {
1089         buf := codec.NewBuffer(b)
1090         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1091         return nil
1092 }
1093
1094 // SwInterfaceClearStatsReply defines message 'sw_interface_clear_stats_reply'.
1095 type SwInterfaceClearStatsReply struct {
1096         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1097 }
1098
1099 func (m *SwInterfaceClearStatsReply) Reset()               { *m = SwInterfaceClearStatsReply{} }
1100 func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" }
1101 func (*SwInterfaceClearStatsReply) GetCrcString() string   { return "e8d4e804" }
1102 func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType {
1103         return api.ReplyMessage
1104 }
1105
1106 func (m *SwInterfaceClearStatsReply) Size() int {
1107         if m == nil {
1108                 return 0
1109         }
1110         var size int
1111         size += 4 // m.Retval
1112         return size
1113 }
1114 func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) {
1115         var buf *codec.Buffer
1116         if b == nil {
1117                 buf = codec.NewBuffer(make([]byte, m.Size()))
1118         } else {
1119                 buf = codec.NewBuffer(b)
1120         }
1121         buf.EncodeUint32(uint32(m.Retval))
1122         return buf.Bytes(), nil
1123 }
1124 func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error {
1125         buf := codec.NewBuffer(b)
1126         m.Retval = int32(buf.DecodeUint32())
1127         return nil
1128 }
1129
1130 // SwInterfaceDetails defines message 'sw_interface_details'.
1131 type SwInterfaceDetails struct {
1132         SwIfIndex        interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1133         SupSwIfIndex     uint32                         `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
1134         L2Address        ethernet_types.MacAddress      `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
1135         Flags            interface_types.IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1136         Type             interface_types.IfType         `binapi:"if_type,name=type" json:"type,omitempty"`
1137         LinkDuplex       interface_types.LinkDuplex     `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
1138         LinkSpeed        uint32                         `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
1139         LinkMtu          uint16                         `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
1140         Mtu              []uint32                       `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1141         SubID            uint32                         `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
1142         SubNumberOfTags  uint8                          `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
1143         SubOuterVlanID   uint16                         `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
1144         SubInnerVlanID   uint16                         `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
1145         SubIfFlags       interface_types.SubIfFlags     `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
1146         VtrOp            uint32                         `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
1147         VtrPushDot1q     uint32                         `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
1148         VtrTag1          uint32                         `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
1149         VtrTag2          uint32                         `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
1150         OuterTag         uint16                         `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
1151         BDmac            ethernet_types.MacAddress      `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
1152         BSmac            ethernet_types.MacAddress      `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
1153         BVlanid          uint16                         `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
1154         ISid             uint32                         `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
1155         InterfaceName    string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
1156         InterfaceDevType string                         `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty"`
1157         Tag              string                         `binapi:"string[64],name=tag" json:"tag,omitempty"`
1158 }
1159
1160 func (m *SwInterfaceDetails) Reset()               { *m = SwInterfaceDetails{} }
1161 func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" }
1162 func (*SwInterfaceDetails) GetCrcString() string   { return "17b69fa2" }
1163 func (*SwInterfaceDetails) GetMessageType() api.MessageType {
1164         return api.ReplyMessage
1165 }
1166
1167 func (m *SwInterfaceDetails) Size() int {
1168         if m == nil {
1169                 return 0
1170         }
1171         var size int
1172         size += 4     // m.SwIfIndex
1173         size += 4     // m.SupSwIfIndex
1174         size += 1 * 6 // m.L2Address
1175         size += 4     // m.Flags
1176         size += 4     // m.Type
1177         size += 4     // m.LinkDuplex
1178         size += 4     // m.LinkSpeed
1179         size += 2     // m.LinkMtu
1180         size += 4 * 4 // m.Mtu
1181         size += 4     // m.SubID
1182         size += 1     // m.SubNumberOfTags
1183         size += 2     // m.SubOuterVlanID
1184         size += 2     // m.SubInnerVlanID
1185         size += 4     // m.SubIfFlags
1186         size += 4     // m.VtrOp
1187         size += 4     // m.VtrPushDot1q
1188         size += 4     // m.VtrTag1
1189         size += 4     // m.VtrTag2
1190         size += 2     // m.OuterTag
1191         size += 1 * 6 // m.BDmac
1192         size += 1 * 6 // m.BSmac
1193         size += 2     // m.BVlanid
1194         size += 4     // m.ISid
1195         size += 64    // m.InterfaceName
1196         size += 64    // m.InterfaceDevType
1197         size += 64    // m.Tag
1198         return size
1199 }
1200 func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
1201         var buf *codec.Buffer
1202         if b == nil {
1203                 buf = codec.NewBuffer(make([]byte, m.Size()))
1204         } else {
1205                 buf = codec.NewBuffer(b)
1206         }
1207         buf.EncodeUint32(uint32(m.SwIfIndex))
1208         buf.EncodeUint32(uint32(m.SupSwIfIndex))
1209         buf.EncodeBytes(m.L2Address[:], 6)
1210         buf.EncodeUint32(uint32(m.Flags))
1211         buf.EncodeUint32(uint32(m.Type))
1212         buf.EncodeUint32(uint32(m.LinkDuplex))
1213         buf.EncodeUint32(uint32(m.LinkSpeed))
1214         buf.EncodeUint16(uint16(m.LinkMtu))
1215         for i := 0; i < 4; i++ {
1216                 var x uint32
1217                 if i < len(m.Mtu) {
1218                         x = uint32(m.Mtu[i])
1219                 }
1220                 buf.EncodeUint32(uint32(x))
1221         }
1222         buf.EncodeUint32(uint32(m.SubID))
1223         buf.EncodeUint8(uint8(m.SubNumberOfTags))
1224         buf.EncodeUint16(uint16(m.SubOuterVlanID))
1225         buf.EncodeUint16(uint16(m.SubInnerVlanID))
1226         buf.EncodeUint32(uint32(m.SubIfFlags))
1227         buf.EncodeUint32(uint32(m.VtrOp))
1228         buf.EncodeUint32(uint32(m.VtrPushDot1q))
1229         buf.EncodeUint32(uint32(m.VtrTag1))
1230         buf.EncodeUint32(uint32(m.VtrTag2))
1231         buf.EncodeUint16(uint16(m.OuterTag))
1232         buf.EncodeBytes(m.BDmac[:], 6)
1233         buf.EncodeBytes(m.BSmac[:], 6)
1234         buf.EncodeUint16(uint16(m.BVlanid))
1235         buf.EncodeUint32(uint32(m.ISid))
1236         buf.EncodeString(m.InterfaceName, 64)
1237         buf.EncodeString(m.InterfaceDevType, 64)
1238         buf.EncodeString(m.Tag, 64)
1239         return buf.Bytes(), nil
1240 }
1241 func (m *SwInterfaceDetails) Unmarshal(b []byte) error {
1242         buf := codec.NewBuffer(b)
1243         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1244         m.SupSwIfIndex = buf.DecodeUint32()
1245         copy(m.L2Address[:], buf.DecodeBytes(6))
1246         m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32())
1247         m.Type = interface_types.IfType(buf.DecodeUint32())
1248         m.LinkDuplex = interface_types.LinkDuplex(buf.DecodeUint32())
1249         m.LinkSpeed = buf.DecodeUint32()
1250         m.LinkMtu = buf.DecodeUint16()
1251         m.Mtu = make([]uint32, 4)
1252         for i := 0; i < len(m.Mtu); i++ {
1253                 m.Mtu[i] = buf.DecodeUint32()
1254         }
1255         m.SubID = buf.DecodeUint32()
1256         m.SubNumberOfTags = buf.DecodeUint8()
1257         m.SubOuterVlanID = buf.DecodeUint16()
1258         m.SubInnerVlanID = buf.DecodeUint16()
1259         m.SubIfFlags = interface_types.SubIfFlags(buf.DecodeUint32())
1260         m.VtrOp = buf.DecodeUint32()
1261         m.VtrPushDot1q = buf.DecodeUint32()
1262         m.VtrTag1 = buf.DecodeUint32()
1263         m.VtrTag2 = buf.DecodeUint32()
1264         m.OuterTag = buf.DecodeUint16()
1265         copy(m.BDmac[:], buf.DecodeBytes(6))
1266         copy(m.BSmac[:], buf.DecodeBytes(6))
1267         m.BVlanid = buf.DecodeUint16()
1268         m.ISid = buf.DecodeUint32()
1269         m.InterfaceName = buf.DecodeString(64)
1270         m.InterfaceDevType = buf.DecodeString(64)
1271         m.Tag = buf.DecodeString(64)
1272         return nil
1273 }
1274
1275 // SwInterfaceDump defines message 'sw_interface_dump'.
1276 type SwInterfaceDump struct {
1277         SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
1278         NameFilterValid bool                           `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
1279         NameFilter      string                         `binapi:"string[],name=name_filter" json:"name_filter,omitempty"`
1280 }
1281
1282 func (m *SwInterfaceDump) Reset()               { *m = SwInterfaceDump{} }
1283 func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" }
1284 func (*SwInterfaceDump) GetCrcString() string   { return "aa610c27" }
1285 func (*SwInterfaceDump) GetMessageType() api.MessageType {
1286         return api.RequestMessage
1287 }
1288
1289 func (m *SwInterfaceDump) Size() int {
1290         if m == nil {
1291                 return 0
1292         }
1293         var size int
1294         size += 4                     // m.SwIfIndex
1295         size += 1                     // m.NameFilterValid
1296         size += 4 + len(m.NameFilter) // m.NameFilter
1297         return size
1298 }
1299 func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
1300         var buf *codec.Buffer
1301         if b == nil {
1302                 buf = codec.NewBuffer(make([]byte, m.Size()))
1303         } else {
1304                 buf = codec.NewBuffer(b)
1305         }
1306         buf.EncodeUint32(uint32(m.SwIfIndex))
1307         buf.EncodeBool(m.NameFilterValid)
1308         buf.EncodeString(m.NameFilter, 0)
1309         return buf.Bytes(), nil
1310 }
1311 func (m *SwInterfaceDump) Unmarshal(b []byte) error {
1312         buf := codec.NewBuffer(b)
1313         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1314         m.NameFilterValid = buf.DecodeBool()
1315         m.NameFilter = buf.DecodeString(0)
1316         return nil
1317 }
1318
1319 // SwInterfaceEvent defines message 'sw_interface_event'.
1320 type SwInterfaceEvent struct {
1321         PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
1322         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1323         Flags     interface_types.IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1324         Deleted   bool                           `binapi:"bool,name=deleted" json:"deleted,omitempty"`
1325 }
1326
1327 func (m *SwInterfaceEvent) Reset()               { *m = SwInterfaceEvent{} }
1328 func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" }
1329 func (*SwInterfaceEvent) GetCrcString() string   { return "f709f78d" }
1330 func (*SwInterfaceEvent) GetMessageType() api.MessageType {
1331         return api.EventMessage
1332 }
1333
1334 func (m *SwInterfaceEvent) Size() int {
1335         if m == nil {
1336                 return 0
1337         }
1338         var size int
1339         size += 4 // m.PID
1340         size += 4 // m.SwIfIndex
1341         size += 4 // m.Flags
1342         size += 1 // m.Deleted
1343         return size
1344 }
1345 func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
1346         var buf *codec.Buffer
1347         if b == nil {
1348                 buf = codec.NewBuffer(make([]byte, m.Size()))
1349         } else {
1350                 buf = codec.NewBuffer(b)
1351         }
1352         buf.EncodeUint32(uint32(m.PID))
1353         buf.EncodeUint32(uint32(m.SwIfIndex))
1354         buf.EncodeUint32(uint32(m.Flags))
1355         buf.EncodeBool(m.Deleted)
1356         return buf.Bytes(), nil
1357 }
1358 func (m *SwInterfaceEvent) Unmarshal(b []byte) error {
1359         buf := codec.NewBuffer(b)
1360         m.PID = buf.DecodeUint32()
1361         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1362         m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32())
1363         m.Deleted = buf.DecodeBool()
1364         return nil
1365 }
1366
1367 // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'.
1368 type SwInterfaceGetMacAddress struct {
1369         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1370 }
1371
1372 func (m *SwInterfaceGetMacAddress) Reset()               { *m = SwInterfaceGetMacAddress{} }
1373 func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" }
1374 func (*SwInterfaceGetMacAddress) GetCrcString() string   { return "f9e6675e" }
1375 func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType {
1376         return api.RequestMessage
1377 }
1378
1379 func (m *SwInterfaceGetMacAddress) Size() int {
1380         if m == nil {
1381                 return 0
1382         }
1383         var size int
1384         size += 4 // m.SwIfIndex
1385         return size
1386 }
1387 func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) {
1388         var buf *codec.Buffer
1389         if b == nil {
1390                 buf = codec.NewBuffer(make([]byte, m.Size()))
1391         } else {
1392                 buf = codec.NewBuffer(b)
1393         }
1394         buf.EncodeUint32(uint32(m.SwIfIndex))
1395         return buf.Bytes(), nil
1396 }
1397 func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error {
1398         buf := codec.NewBuffer(b)
1399         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1400         return nil
1401 }
1402
1403 // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'.
1404 type SwInterfaceGetMacAddressReply struct {
1405         Retval     int32                     `binapi:"i32,name=retval" json:"retval,omitempty"`
1406         MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
1407 }
1408
1409 func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
1410 func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
1411         return "sw_interface_get_mac_address_reply"
1412 }
1413 func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" }
1414 func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType {
1415         return api.ReplyMessage
1416 }
1417
1418 func (m *SwInterfaceGetMacAddressReply) Size() int {
1419         if m == nil {
1420                 return 0
1421         }
1422         var size int
1423         size += 4     // m.Retval
1424         size += 1 * 6 // m.MacAddress
1425         return size
1426 }
1427 func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
1428         var buf *codec.Buffer
1429         if b == nil {
1430                 buf = codec.NewBuffer(make([]byte, m.Size()))
1431         } else {
1432                 buf = codec.NewBuffer(b)
1433         }
1434         buf.EncodeUint32(uint32(m.Retval))
1435         buf.EncodeBytes(m.MacAddress[:], 6)
1436         return buf.Bytes(), nil
1437 }
1438 func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error {
1439         buf := codec.NewBuffer(b)
1440         m.Retval = int32(buf.DecodeUint32())
1441         copy(m.MacAddress[:], buf.DecodeBytes(6))
1442         return nil
1443 }
1444
1445 // SwInterfaceGetTable defines message 'sw_interface_get_table'.
1446 type SwInterfaceGetTable struct {
1447         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1448         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1449 }
1450
1451 func (m *SwInterfaceGetTable) Reset()               { *m = SwInterfaceGetTable{} }
1452 func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" }
1453 func (*SwInterfaceGetTable) GetCrcString() string   { return "2d033de4" }
1454 func (*SwInterfaceGetTable) GetMessageType() api.MessageType {
1455         return api.RequestMessage
1456 }
1457
1458 func (m *SwInterfaceGetTable) Size() int {
1459         if m == nil {
1460                 return 0
1461         }
1462         var size int
1463         size += 4 // m.SwIfIndex
1464         size += 1 // m.IsIPv6
1465         return size
1466 }
1467 func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
1468         var buf *codec.Buffer
1469         if b == nil {
1470                 buf = codec.NewBuffer(make([]byte, m.Size()))
1471         } else {
1472                 buf = codec.NewBuffer(b)
1473         }
1474         buf.EncodeUint32(uint32(m.SwIfIndex))
1475         buf.EncodeBool(m.IsIPv6)
1476         return buf.Bytes(), nil
1477 }
1478 func (m *SwInterfaceGetTable) Unmarshal(b []byte) error {
1479         buf := codec.NewBuffer(b)
1480         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1481         m.IsIPv6 = buf.DecodeBool()
1482         return nil
1483 }
1484
1485 // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'.
1486 type SwInterfaceGetTableReply struct {
1487         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1488         VrfID  uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1489 }
1490
1491 func (m *SwInterfaceGetTableReply) Reset()               { *m = SwInterfaceGetTableReply{} }
1492 func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" }
1493 func (*SwInterfaceGetTableReply) GetCrcString() string   { return "a6eb0109" }
1494 func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType {
1495         return api.ReplyMessage
1496 }
1497
1498 func (m *SwInterfaceGetTableReply) Size() int {
1499         if m == nil {
1500                 return 0
1501         }
1502         var size int
1503         size += 4 // m.Retval
1504         size += 4 // m.VrfID
1505         return size
1506 }
1507 func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
1508         var buf *codec.Buffer
1509         if b == nil {
1510                 buf = codec.NewBuffer(make([]byte, m.Size()))
1511         } else {
1512                 buf = codec.NewBuffer(b)
1513         }
1514         buf.EncodeUint32(uint32(m.Retval))
1515         buf.EncodeUint32(uint32(m.VrfID))
1516         return buf.Bytes(), nil
1517 }
1518 func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error {
1519         buf := codec.NewBuffer(b)
1520         m.Retval = int32(buf.DecodeUint32())
1521         m.VrfID = buf.DecodeUint32()
1522         return nil
1523 }
1524
1525 // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'.
1526 type SwInterfaceRxPlacementDetails struct {
1527         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1528         QueueID   uint32                         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
1529         WorkerID  uint32                         `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
1530         Mode      interface_types.RxMode         `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
1531 }
1532
1533 func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
1534 func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
1535         return "sw_interface_rx_placement_details"
1536 }
1537 func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "f6d7d024" }
1538 func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType {
1539         return api.RequestMessage
1540 }
1541
1542 func (m *SwInterfaceRxPlacementDetails) Size() int {
1543         if m == nil {
1544                 return 0
1545         }
1546         var size int
1547         size += 4 // m.SwIfIndex
1548         size += 4 // m.QueueID
1549         size += 4 // m.WorkerID
1550         size += 4 // m.Mode
1551         return size
1552 }
1553 func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
1554         var buf *codec.Buffer
1555         if b == nil {
1556                 buf = codec.NewBuffer(make([]byte, m.Size()))
1557         } else {
1558                 buf = codec.NewBuffer(b)
1559         }
1560         buf.EncodeUint32(uint32(m.SwIfIndex))
1561         buf.EncodeUint32(uint32(m.QueueID))
1562         buf.EncodeUint32(uint32(m.WorkerID))
1563         buf.EncodeUint32(uint32(m.Mode))
1564         return buf.Bytes(), nil
1565 }
1566 func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error {
1567         buf := codec.NewBuffer(b)
1568         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1569         m.QueueID = buf.DecodeUint32()
1570         m.WorkerID = buf.DecodeUint32()
1571         m.Mode = interface_types.RxMode(buf.DecodeUint32())
1572         return nil
1573 }
1574
1575 // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'.
1576 type SwInterfaceRxPlacementDump struct {
1577         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1578 }
1579
1580 func (m *SwInterfaceRxPlacementDump) Reset()               { *m = SwInterfaceRxPlacementDump{} }
1581 func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" }
1582 func (*SwInterfaceRxPlacementDump) GetCrcString() string   { return "f9e6675e" }
1583 func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType {
1584         return api.RequestMessage
1585 }
1586
1587 func (m *SwInterfaceRxPlacementDump) Size() int {
1588         if m == nil {
1589                 return 0
1590         }
1591         var size int
1592         size += 4 // m.SwIfIndex
1593         return size
1594 }
1595 func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) {
1596         var buf *codec.Buffer
1597         if b == nil {
1598                 buf = codec.NewBuffer(make([]byte, m.Size()))
1599         } else {
1600                 buf = codec.NewBuffer(b)
1601         }
1602         buf.EncodeUint32(uint32(m.SwIfIndex))
1603         return buf.Bytes(), nil
1604 }
1605 func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error {
1606         buf := codec.NewBuffer(b)
1607         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1608         return nil
1609 }
1610
1611 // SwInterfaceSetFlags defines message 'sw_interface_set_flags'.
1612 type SwInterfaceSetFlags struct {
1613         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1614         Flags     interface_types.IfStatusFlags  `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
1615 }
1616
1617 func (m *SwInterfaceSetFlags) Reset()               { *m = SwInterfaceSetFlags{} }
1618 func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" }
1619 func (*SwInterfaceSetFlags) GetCrcString() string   { return "6a2b491a" }
1620 func (*SwInterfaceSetFlags) GetMessageType() api.MessageType {
1621         return api.RequestMessage
1622 }
1623
1624 func (m *SwInterfaceSetFlags) Size() int {
1625         if m == nil {
1626                 return 0
1627         }
1628         var size int
1629         size += 4 // m.SwIfIndex
1630         size += 4 // m.Flags
1631         return size
1632 }
1633 func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
1634         var buf *codec.Buffer
1635         if b == nil {
1636                 buf = codec.NewBuffer(make([]byte, m.Size()))
1637         } else {
1638                 buf = codec.NewBuffer(b)
1639         }
1640         buf.EncodeUint32(uint32(m.SwIfIndex))
1641         buf.EncodeUint32(uint32(m.Flags))
1642         return buf.Bytes(), nil
1643 }
1644 func (m *SwInterfaceSetFlags) Unmarshal(b []byte) error {
1645         buf := codec.NewBuffer(b)
1646         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1647         m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32())
1648         return nil
1649 }
1650
1651 // SwInterfaceSetFlagsReply defines message 'sw_interface_set_flags_reply'.
1652 type SwInterfaceSetFlagsReply struct {
1653         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1654 }
1655
1656 func (m *SwInterfaceSetFlagsReply) Reset()               { *m = SwInterfaceSetFlagsReply{} }
1657 func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" }
1658 func (*SwInterfaceSetFlagsReply) GetCrcString() string   { return "e8d4e804" }
1659 func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType {
1660         return api.ReplyMessage
1661 }
1662
1663 func (m *SwInterfaceSetFlagsReply) Size() int {
1664         if m == nil {
1665                 return 0
1666         }
1667         var size int
1668         size += 4 // m.Retval
1669         return size
1670 }
1671 func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) {
1672         var buf *codec.Buffer
1673         if b == nil {
1674                 buf = codec.NewBuffer(make([]byte, m.Size()))
1675         } else {
1676                 buf = codec.NewBuffer(b)
1677         }
1678         buf.EncodeUint32(uint32(m.Retval))
1679         return buf.Bytes(), nil
1680 }
1681 func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error {
1682         buf := codec.NewBuffer(b)
1683         m.Retval = int32(buf.DecodeUint32())
1684         return nil
1685 }
1686
1687 // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
1688 type SwInterfaceSetIPDirectedBroadcast struct {
1689         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1690         Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
1691 }
1692
1693 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
1694 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
1695         return "sw_interface_set_ip_directed_broadcast"
1696 }
1697 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
1698 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType {
1699         return api.RequestMessage
1700 }
1701
1702 func (m *SwInterfaceSetIPDirectedBroadcast) Size() int {
1703         if m == nil {
1704                 return 0
1705         }
1706         var size int
1707         size += 4 // m.SwIfIndex
1708         size += 1 // m.Enable
1709         return size
1710 }
1711 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
1712         var buf *codec.Buffer
1713         if b == nil {
1714                 buf = codec.NewBuffer(make([]byte, m.Size()))
1715         } else {
1716                 buf = codec.NewBuffer(b)
1717         }
1718         buf.EncodeUint32(uint32(m.SwIfIndex))
1719         buf.EncodeBool(m.Enable)
1720         return buf.Bytes(), nil
1721 }
1722 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error {
1723         buf := codec.NewBuffer(b)
1724         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1725         m.Enable = buf.DecodeBool()
1726         return nil
1727 }
1728
1729 // SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'.
1730 type SwInterfaceSetIPDirectedBroadcastReply struct {
1731         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1732 }
1733
1734 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
1735         *m = SwInterfaceSetIPDirectedBroadcastReply{}
1736 }
1737 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
1738         return "sw_interface_set_ip_directed_broadcast_reply"
1739 }
1740 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
1741 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
1742         return api.ReplyMessage
1743 }
1744
1745 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() int {
1746         if m == nil {
1747                 return 0
1748         }
1749         var size int
1750         size += 4 // m.Retval
1751         return size
1752 }
1753 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
1754         var buf *codec.Buffer
1755         if b == nil {
1756                 buf = codec.NewBuffer(make([]byte, m.Size()))
1757         } else {
1758                 buf = codec.NewBuffer(b)
1759         }
1760         buf.EncodeUint32(uint32(m.Retval))
1761         return buf.Bytes(), nil
1762 }
1763 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error {
1764         buf := codec.NewBuffer(b)
1765         m.Retval = int32(buf.DecodeUint32())
1766         return nil
1767 }
1768
1769 // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'.
1770 type SwInterfaceSetMacAddress struct {
1771         SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1772         MacAddress ethernet_types.MacAddress      `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
1773 }
1774
1775 func (m *SwInterfaceSetMacAddress) Reset()               { *m = SwInterfaceSetMacAddress{} }
1776 func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" }
1777 func (*SwInterfaceSetMacAddress) GetCrcString() string   { return "6aca746a" }
1778 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType {
1779         return api.RequestMessage
1780 }
1781
1782 func (m *SwInterfaceSetMacAddress) Size() int {
1783         if m == nil {
1784                 return 0
1785         }
1786         var size int
1787         size += 4     // m.SwIfIndex
1788         size += 1 * 6 // m.MacAddress
1789         return size
1790 }
1791 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
1792         var buf *codec.Buffer
1793         if b == nil {
1794                 buf = codec.NewBuffer(make([]byte, m.Size()))
1795         } else {
1796                 buf = codec.NewBuffer(b)
1797         }
1798         buf.EncodeUint32(uint32(m.SwIfIndex))
1799         buf.EncodeBytes(m.MacAddress[:], 6)
1800         return buf.Bytes(), nil
1801 }
1802 func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error {
1803         buf := codec.NewBuffer(b)
1804         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1805         copy(m.MacAddress[:], buf.DecodeBytes(6))
1806         return nil
1807 }
1808
1809 // SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'.
1810 type SwInterfaceSetMacAddressReply struct {
1811         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1812 }
1813
1814 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
1815 func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
1816         return "sw_interface_set_mac_address_reply"
1817 }
1818 func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
1819 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType {
1820         return api.ReplyMessage
1821 }
1822
1823 func (m *SwInterfaceSetMacAddressReply) Size() int {
1824         if m == nil {
1825                 return 0
1826         }
1827         var size int
1828         size += 4 // m.Retval
1829         return size
1830 }
1831 func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) {
1832         var buf *codec.Buffer
1833         if b == nil {
1834                 buf = codec.NewBuffer(make([]byte, m.Size()))
1835         } else {
1836                 buf = codec.NewBuffer(b)
1837         }
1838         buf.EncodeUint32(uint32(m.Retval))
1839         return buf.Bytes(), nil
1840 }
1841 func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error {
1842         buf := codec.NewBuffer(b)
1843         m.Retval = int32(buf.DecodeUint32())
1844         return nil
1845 }
1846
1847 // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'.
1848 type SwInterfaceSetMtu struct {
1849         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1850         Mtu       []uint32                       `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1851 }
1852
1853 func (m *SwInterfaceSetMtu) Reset()               { *m = SwInterfaceSetMtu{} }
1854 func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" }
1855 func (*SwInterfaceSetMtu) GetCrcString() string   { return "5cbe85e5" }
1856 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType {
1857         return api.RequestMessage
1858 }
1859
1860 func (m *SwInterfaceSetMtu) Size() int {
1861         if m == nil {
1862                 return 0
1863         }
1864         var size int
1865         size += 4     // m.SwIfIndex
1866         size += 4 * 4 // m.Mtu
1867         return size
1868 }
1869 func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
1870         var buf *codec.Buffer
1871         if b == nil {
1872                 buf = codec.NewBuffer(make([]byte, m.Size()))
1873         } else {
1874                 buf = codec.NewBuffer(b)
1875         }
1876         buf.EncodeUint32(uint32(m.SwIfIndex))
1877         for i := 0; i < 4; i++ {
1878                 var x uint32
1879                 if i < len(m.Mtu) {
1880                         x = uint32(m.Mtu[i])
1881                 }
1882                 buf.EncodeUint32(uint32(x))
1883         }
1884         return buf.Bytes(), nil
1885 }
1886 func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error {
1887         buf := codec.NewBuffer(b)
1888         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1889         m.Mtu = make([]uint32, 4)
1890         for i := 0; i < len(m.Mtu); i++ {
1891                 m.Mtu[i] = buf.DecodeUint32()
1892         }
1893         return nil
1894 }
1895
1896 // SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'.
1897 type SwInterfaceSetMtuReply struct {
1898         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1899 }
1900
1901 func (m *SwInterfaceSetMtuReply) Reset()               { *m = SwInterfaceSetMtuReply{} }
1902 func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" }
1903 func (*SwInterfaceSetMtuReply) GetCrcString() string   { return "e8d4e804" }
1904 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType {
1905         return api.ReplyMessage
1906 }
1907
1908 func (m *SwInterfaceSetMtuReply) Size() int {
1909         if m == nil {
1910                 return 0
1911         }
1912         var size int
1913         size += 4 // m.Retval
1914         return size
1915 }
1916 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
1917         var buf *codec.Buffer
1918         if b == nil {
1919                 buf = codec.NewBuffer(make([]byte, m.Size()))
1920         } else {
1921                 buf = codec.NewBuffer(b)
1922         }
1923         buf.EncodeUint32(uint32(m.Retval))
1924         return buf.Bytes(), nil
1925 }
1926 func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error {
1927         buf := codec.NewBuffer(b)
1928         m.Retval = int32(buf.DecodeUint32())
1929         return nil
1930 }
1931
1932 // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'.
1933 type SwInterfaceSetRxMode struct {
1934         SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1935         QueueIDValid bool                           `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
1936         QueueID      uint32                         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
1937         Mode         interface_types.RxMode         `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
1938 }
1939
1940 func (m *SwInterfaceSetRxMode) Reset()               { *m = SwInterfaceSetRxMode{} }
1941 func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" }
1942 func (*SwInterfaceSetRxMode) GetCrcString() string   { return "780f5cee" }
1943 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType {
1944         return api.RequestMessage
1945 }
1946
1947 func (m *SwInterfaceSetRxMode) Size() int {
1948         if m == nil {
1949                 return 0
1950         }
1951         var size int
1952         size += 4 // m.SwIfIndex
1953         size += 1 // m.QueueIDValid
1954         size += 4 // m.QueueID
1955         size += 4 // m.Mode
1956         return size
1957 }
1958 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
1959         var buf *codec.Buffer
1960         if b == nil {
1961                 buf = codec.NewBuffer(make([]byte, m.Size()))
1962         } else {
1963                 buf = codec.NewBuffer(b)
1964         }
1965         buf.EncodeUint32(uint32(m.SwIfIndex))
1966         buf.EncodeBool(m.QueueIDValid)
1967         buf.EncodeUint32(uint32(m.QueueID))
1968         buf.EncodeUint32(uint32(m.Mode))
1969         return buf.Bytes(), nil
1970 }
1971 func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error {
1972         buf := codec.NewBuffer(b)
1973         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1974         m.QueueIDValid = buf.DecodeBool()
1975         m.QueueID = buf.DecodeUint32()
1976         m.Mode = interface_types.RxMode(buf.DecodeUint32())
1977         return nil
1978 }
1979
1980 // SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'.
1981 type SwInterfaceSetRxModeReply struct {
1982         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1983 }
1984
1985 func (m *SwInterfaceSetRxModeReply) Reset()               { *m = SwInterfaceSetRxModeReply{} }
1986 func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" }
1987 func (*SwInterfaceSetRxModeReply) GetCrcString() string   { return "e8d4e804" }
1988 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType {
1989         return api.ReplyMessage
1990 }
1991
1992 func (m *SwInterfaceSetRxModeReply) Size() int {
1993         if m == nil {
1994                 return 0
1995         }
1996         var size int
1997         size += 4 // m.Retval
1998         return size
1999 }
2000 func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) {
2001         var buf *codec.Buffer
2002         if b == nil {
2003                 buf = codec.NewBuffer(make([]byte, m.Size()))
2004         } else {
2005                 buf = codec.NewBuffer(b)
2006         }
2007         buf.EncodeUint32(uint32(m.Retval))
2008         return buf.Bytes(), nil
2009 }
2010 func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error {
2011         buf := codec.NewBuffer(b)
2012         m.Retval = int32(buf.DecodeUint32())
2013         return nil
2014 }
2015
2016 // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'.
2017 type SwInterfaceSetRxPlacement struct {
2018         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2019         QueueID   uint32                         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
2020         WorkerID  uint32                         `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
2021         IsMain    bool                           `binapi:"bool,name=is_main" json:"is_main,omitempty"`
2022 }
2023
2024 func (m *SwInterfaceSetRxPlacement) Reset()               { *m = SwInterfaceSetRxPlacement{} }
2025 func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" }
2026 func (*SwInterfaceSetRxPlacement) GetCrcString() string   { return "db65f3c9" }
2027 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType {
2028         return api.RequestMessage
2029 }
2030
2031 func (m *SwInterfaceSetRxPlacement) Size() int {
2032         if m == nil {
2033                 return 0
2034         }
2035         var size int
2036         size += 4 // m.SwIfIndex
2037         size += 4 // m.QueueID
2038         size += 4 // m.WorkerID
2039         size += 1 // m.IsMain
2040         return size
2041 }
2042 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
2043         var buf *codec.Buffer
2044         if b == nil {
2045                 buf = codec.NewBuffer(make([]byte, m.Size()))
2046         } else {
2047                 buf = codec.NewBuffer(b)
2048         }
2049         buf.EncodeUint32(uint32(m.SwIfIndex))
2050         buf.EncodeUint32(uint32(m.QueueID))
2051         buf.EncodeUint32(uint32(m.WorkerID))
2052         buf.EncodeBool(m.IsMain)
2053         return buf.Bytes(), nil
2054 }
2055 func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error {
2056         buf := codec.NewBuffer(b)
2057         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2058         m.QueueID = buf.DecodeUint32()
2059         m.WorkerID = buf.DecodeUint32()
2060         m.IsMain = buf.DecodeBool()
2061         return nil
2062 }
2063
2064 // SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'.
2065 type SwInterfaceSetRxPlacementReply struct {
2066         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2067 }
2068
2069 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
2070 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
2071         return "sw_interface_set_rx_placement_reply"
2072 }
2073 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
2074 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType {
2075         return api.ReplyMessage
2076 }
2077
2078 func (m *SwInterfaceSetRxPlacementReply) Size() int {
2079         if m == nil {
2080                 return 0
2081         }
2082         var size int
2083         size += 4 // m.Retval
2084         return size
2085 }
2086 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
2087         var buf *codec.Buffer
2088         if b == nil {
2089                 buf = codec.NewBuffer(make([]byte, m.Size()))
2090         } else {
2091                 buf = codec.NewBuffer(b)
2092         }
2093         buf.EncodeUint32(uint32(m.Retval))
2094         return buf.Bytes(), nil
2095 }
2096 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error {
2097         buf := codec.NewBuffer(b)
2098         m.Retval = int32(buf.DecodeUint32())
2099         return nil
2100 }
2101
2102 // SwInterfaceSetTable defines message 'sw_interface_set_table'.
2103 type SwInterfaceSetTable struct {
2104         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2105         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2106         VrfID     uint32                         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2107 }
2108
2109 func (m *SwInterfaceSetTable) Reset()               { *m = SwInterfaceSetTable{} }
2110 func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" }
2111 func (*SwInterfaceSetTable) GetCrcString() string   { return "df42a577" }
2112 func (*SwInterfaceSetTable) GetMessageType() api.MessageType {
2113         return api.RequestMessage
2114 }
2115
2116 func (m *SwInterfaceSetTable) Size() int {
2117         if m == nil {
2118                 return 0
2119         }
2120         var size int
2121         size += 4 // m.SwIfIndex
2122         size += 1 // m.IsIPv6
2123         size += 4 // m.VrfID
2124         return size
2125 }
2126 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
2127         var buf *codec.Buffer
2128         if b == nil {
2129                 buf = codec.NewBuffer(make([]byte, m.Size()))
2130         } else {
2131                 buf = codec.NewBuffer(b)
2132         }
2133         buf.EncodeUint32(uint32(m.SwIfIndex))
2134         buf.EncodeBool(m.IsIPv6)
2135         buf.EncodeUint32(uint32(m.VrfID))
2136         return buf.Bytes(), nil
2137 }
2138 func (m *SwInterfaceSetTable) Unmarshal(b []byte) error {
2139         buf := codec.NewBuffer(b)
2140         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2141         m.IsIPv6 = buf.DecodeBool()
2142         m.VrfID = buf.DecodeUint32()
2143         return nil
2144 }
2145
2146 // SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'.
2147 type SwInterfaceSetTableReply struct {
2148         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2149 }
2150
2151 func (m *SwInterfaceSetTableReply) Reset()               { *m = SwInterfaceSetTableReply{} }
2152 func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" }
2153 func (*SwInterfaceSetTableReply) GetCrcString() string   { return "e8d4e804" }
2154 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType {
2155         return api.ReplyMessage
2156 }
2157
2158 func (m *SwInterfaceSetTableReply) Size() int {
2159         if m == nil {
2160                 return 0
2161         }
2162         var size int
2163         size += 4 // m.Retval
2164         return size
2165 }
2166 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
2167         var buf *codec.Buffer
2168         if b == nil {
2169                 buf = codec.NewBuffer(make([]byte, m.Size()))
2170         } else {
2171                 buf = codec.NewBuffer(b)
2172         }
2173         buf.EncodeUint32(uint32(m.Retval))
2174         return buf.Bytes(), nil
2175 }
2176 func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
2177         buf := codec.NewBuffer(b)
2178         m.Retval = int32(buf.DecodeUint32())
2179         return nil
2180 }
2181
2182 // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
2183 type SwInterfaceSetUnnumbered struct {
2184         SwIfIndex           interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2185         UnnumberedSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
2186         IsAdd               bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2187 }
2188
2189 func (m *SwInterfaceSetUnnumbered) Reset()               { *m = SwInterfaceSetUnnumbered{} }
2190 func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" }
2191 func (*SwInterfaceSetUnnumbered) GetCrcString() string   { return "938ef33b" }
2192 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType {
2193         return api.RequestMessage
2194 }
2195
2196 func (m *SwInterfaceSetUnnumbered) Size() int {
2197         if m == nil {
2198                 return 0
2199         }
2200         var size int
2201         size += 4 // m.SwIfIndex
2202         size += 4 // m.UnnumberedSwIfIndex
2203         size += 1 // m.IsAdd
2204         return size
2205 }
2206 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
2207         var buf *codec.Buffer
2208         if b == nil {
2209                 buf = codec.NewBuffer(make([]byte, m.Size()))
2210         } else {
2211                 buf = codec.NewBuffer(b)
2212         }
2213         buf.EncodeUint32(uint32(m.SwIfIndex))
2214         buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex))
2215         buf.EncodeBool(m.IsAdd)
2216         return buf.Bytes(), nil
2217 }
2218 func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error {
2219         buf := codec.NewBuffer(b)
2220         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2221         m.UnnumberedSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2222         m.IsAdd = buf.DecodeBool()
2223         return nil
2224 }
2225
2226 // SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'.
2227 type SwInterfaceSetUnnumberedReply struct {
2228         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2229 }
2230
2231 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
2232 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
2233         return "sw_interface_set_unnumbered_reply"
2234 }
2235 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
2236 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType {
2237         return api.ReplyMessage
2238 }
2239
2240 func (m *SwInterfaceSetUnnumberedReply) Size() int {
2241         if m == nil {
2242                 return 0
2243         }
2244         var size int
2245         size += 4 // m.Retval
2246         return size
2247 }
2248 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
2249         var buf *codec.Buffer
2250         if b == nil {
2251                 buf = codec.NewBuffer(make([]byte, m.Size()))
2252         } else {
2253                 buf = codec.NewBuffer(b)
2254         }
2255         buf.EncodeUint32(uint32(m.Retval))
2256         return buf.Bytes(), nil
2257 }
2258 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error {
2259         buf := codec.NewBuffer(b)
2260         m.Retval = int32(buf.DecodeUint32())
2261         return nil
2262 }
2263
2264 // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'.
2265 type SwInterfaceTagAddDel struct {
2266         IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2267         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2268         Tag       string                         `binapi:"string[64],name=tag" json:"tag,omitempty"`
2269 }
2270
2271 func (m *SwInterfaceTagAddDel) Reset()               { *m = SwInterfaceTagAddDel{} }
2272 func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" }
2273 func (*SwInterfaceTagAddDel) GetCrcString() string   { return "426f8bc1" }
2274 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType {
2275         return api.RequestMessage
2276 }
2277
2278 func (m *SwInterfaceTagAddDel) Size() int {
2279         if m == nil {
2280                 return 0
2281         }
2282         var size int
2283         size += 1  // m.IsAdd
2284         size += 4  // m.SwIfIndex
2285         size += 64 // m.Tag
2286         return size
2287 }
2288 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
2289         var buf *codec.Buffer
2290         if b == nil {
2291                 buf = codec.NewBuffer(make([]byte, m.Size()))
2292         } else {
2293                 buf = codec.NewBuffer(b)
2294         }
2295         buf.EncodeBool(m.IsAdd)
2296         buf.EncodeUint32(uint32(m.SwIfIndex))
2297         buf.EncodeString(m.Tag, 64)
2298         return buf.Bytes(), nil
2299 }
2300 func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error {
2301         buf := codec.NewBuffer(b)
2302         m.IsAdd = buf.DecodeBool()
2303         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2304         m.Tag = buf.DecodeString(64)
2305         return nil
2306 }
2307
2308 // SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'.
2309 type SwInterfaceTagAddDelReply struct {
2310         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2311 }
2312
2313 func (m *SwInterfaceTagAddDelReply) Reset()               { *m = SwInterfaceTagAddDelReply{} }
2314 func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" }
2315 func (*SwInterfaceTagAddDelReply) GetCrcString() string   { return "e8d4e804" }
2316 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType {
2317         return api.ReplyMessage
2318 }
2319
2320 func (m *SwInterfaceTagAddDelReply) Size() int {
2321         if m == nil {
2322                 return 0
2323         }
2324         var size int
2325         size += 4 // m.Retval
2326         return size
2327 }
2328 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
2329         var buf *codec.Buffer
2330         if b == nil {
2331                 buf = codec.NewBuffer(make([]byte, m.Size()))
2332         } else {
2333                 buf = codec.NewBuffer(b)
2334         }
2335         buf.EncodeUint32(uint32(m.Retval))
2336         return buf.Bytes(), nil
2337 }
2338 func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
2339         buf := codec.NewBuffer(b)
2340         m.Retval = int32(buf.DecodeUint32())
2341         return nil
2342 }
2343
2344 // WantInterfaceEvents defines message 'want_interface_events'.
2345 type WantInterfaceEvents struct {
2346         EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
2347         PID           uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2348 }
2349
2350 func (m *WantInterfaceEvents) Reset()               { *m = WantInterfaceEvents{} }
2351 func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" }
2352 func (*WantInterfaceEvents) GetCrcString() string   { return "476f5a08" }
2353 func (*WantInterfaceEvents) GetMessageType() api.MessageType {
2354         return api.RequestMessage
2355 }
2356
2357 func (m *WantInterfaceEvents) Size() int {
2358         if m == nil {
2359                 return 0
2360         }
2361         var size int
2362         size += 4 // m.EnableDisable
2363         size += 4 // m.PID
2364         return size
2365 }
2366 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
2367         var buf *codec.Buffer
2368         if b == nil {
2369                 buf = codec.NewBuffer(make([]byte, m.Size()))
2370         } else {
2371                 buf = codec.NewBuffer(b)
2372         }
2373         buf.EncodeUint32(uint32(m.EnableDisable))
2374         buf.EncodeUint32(uint32(m.PID))
2375         return buf.Bytes(), nil
2376 }
2377 func (m *WantInterfaceEvents) Unmarshal(b []byte) error {
2378         buf := codec.NewBuffer(b)
2379         m.EnableDisable = buf.DecodeUint32()
2380         m.PID = buf.DecodeUint32()
2381         return nil
2382 }
2383
2384 // WantInterfaceEventsReply defines message 'want_interface_events_reply'.
2385 type WantInterfaceEventsReply struct {
2386         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2387 }
2388
2389 func (m *WantInterfaceEventsReply) Reset()               { *m = WantInterfaceEventsReply{} }
2390 func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" }
2391 func (*WantInterfaceEventsReply) GetCrcString() string   { return "e8d4e804" }
2392 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType {
2393         return api.ReplyMessage
2394 }
2395
2396 func (m *WantInterfaceEventsReply) Size() int {
2397         if m == nil {
2398                 return 0
2399         }
2400         var size int
2401         size += 4 // m.Retval
2402         return size
2403 }
2404 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
2405         var buf *codec.Buffer
2406         if b == nil {
2407                 buf = codec.NewBuffer(make([]byte, m.Size()))
2408         } else {
2409                 buf = codec.NewBuffer(b)
2410         }
2411         buf.EncodeUint32(uint32(m.Retval))
2412         return buf.Bytes(), nil
2413 }
2414 func (m *WantInterfaceEventsReply) Unmarshal(b []byte) error {
2415         buf := codec.NewBuffer(b)
2416         m.Retval = int32(buf.DecodeUint32())
2417         return nil
2418 }
2419
2420 func init() { file_interfaces_binapi_init() }
2421 func file_interfaces_binapi_init() {
2422         api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee")
2423         api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804")
2424         api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22")
2425         api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2")
2426         api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f")
2427         api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f")
2428         api.RegisterMessage((*CreateSubif)(nil), "create_subif_cb371063")
2429         api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f")
2430         api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b")
2431         api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f")
2432         api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e")
2433         api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804")
2434         api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e")
2435         api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804")
2436         api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899")
2437         api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804")
2438         api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8")
2439         api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804")
2440         api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5803d5c4")
2441         api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804")
2442         api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4")
2443         api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804")
2444         api.RegisterMessage((*SwInterfaceAddressReplaceBegin)(nil), "sw_interface_address_replace_begin_51077d14")
2445         api.RegisterMessage((*SwInterfaceAddressReplaceBeginReply)(nil), "sw_interface_address_replace_begin_reply_e8d4e804")
2446         api.RegisterMessage((*SwInterfaceAddressReplaceEnd)(nil), "sw_interface_address_replace_end_51077d14")
2447         api.RegisterMessage((*SwInterfaceAddressReplaceEndReply)(nil), "sw_interface_address_replace_end_reply_e8d4e804")
2448         api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e")
2449         api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804")
2450         api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_17b69fa2")
2451         api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27")
2452         api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_f709f78d")
2453         api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e")
2454         api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08")
2455         api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4")
2456         api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109")
2457         api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_f6d7d024")
2458         api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
2459         api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_6a2b491a")
2460         api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
2461         api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
2462         api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
2463         api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_6aca746a")
2464         api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804")
2465         api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5")
2466         api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804")
2467         api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_780f5cee")
2468         api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804")
2469         api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9")
2470         api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
2471         api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
2472         api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
2473         api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_938ef33b")
2474         api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
2475         api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
2476         api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
2477         api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
2478         api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
2479 }
2480
2481 // Messages returns list of all messages in this module.
2482 func AllMessages() []api.Message {
2483         return []api.Message{
2484                 (*CollectDetailedInterfaceStats)(nil),
2485                 (*CollectDetailedInterfaceStatsReply)(nil),
2486                 (*CreateLoopback)(nil),
2487                 (*CreateLoopbackInstance)(nil),
2488                 (*CreateLoopbackInstanceReply)(nil),
2489                 (*CreateLoopbackReply)(nil),
2490                 (*CreateSubif)(nil),
2491                 (*CreateSubifReply)(nil),
2492                 (*CreateVlanSubif)(nil),
2493                 (*CreateVlanSubifReply)(nil),
2494                 (*DeleteLoopback)(nil),
2495                 (*DeleteLoopbackReply)(nil),
2496                 (*DeleteSubif)(nil),
2497                 (*DeleteSubifReply)(nil),
2498                 (*HwInterfaceSetMtu)(nil),
2499                 (*HwInterfaceSetMtuReply)(nil),
2500                 (*InterfaceNameRenumber)(nil),
2501                 (*InterfaceNameRenumberReply)(nil),
2502                 (*SwInterfaceAddDelAddress)(nil),
2503                 (*SwInterfaceAddDelAddressReply)(nil),
2504                 (*SwInterfaceAddDelMacAddress)(nil),
2505                 (*SwInterfaceAddDelMacAddressReply)(nil),
2506                 (*SwInterfaceAddressReplaceBegin)(nil),
2507                 (*SwInterfaceAddressReplaceBeginReply)(nil),
2508                 (*SwInterfaceAddressReplaceEnd)(nil),
2509                 (*SwInterfaceAddressReplaceEndReply)(nil),
2510                 (*SwInterfaceClearStats)(nil),
2511                 (*SwInterfaceClearStatsReply)(nil),
2512                 (*SwInterfaceDetails)(nil),
2513                 (*SwInterfaceDump)(nil),
2514                 (*SwInterfaceEvent)(nil),
2515                 (*SwInterfaceGetMacAddress)(nil),
2516                 (*SwInterfaceGetMacAddressReply)(nil),
2517                 (*SwInterfaceGetTable)(nil),
2518                 (*SwInterfaceGetTableReply)(nil),
2519                 (*SwInterfaceRxPlacementDetails)(nil),
2520                 (*SwInterfaceRxPlacementDump)(nil),
2521                 (*SwInterfaceSetFlags)(nil),
2522                 (*SwInterfaceSetFlagsReply)(nil),
2523                 (*SwInterfaceSetIPDirectedBroadcast)(nil),
2524                 (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
2525                 (*SwInterfaceSetMacAddress)(nil),
2526                 (*SwInterfaceSetMacAddressReply)(nil),
2527                 (*SwInterfaceSetMtu)(nil),
2528                 (*SwInterfaceSetMtuReply)(nil),
2529                 (*SwInterfaceSetRxMode)(nil),
2530                 (*SwInterfaceSetRxModeReply)(nil),
2531                 (*SwInterfaceSetRxPlacement)(nil),
2532                 (*SwInterfaceSetRxPlacementReply)(nil),
2533                 (*SwInterfaceSetTable)(nil),
2534                 (*SwInterfaceSetTableReply)(nil),
2535                 (*SwInterfaceSetUnnumbered)(nil),
2536                 (*SwInterfaceSetUnnumberedReply)(nil),
2537                 (*SwInterfaceTagAddDel)(nil),
2538                 (*SwInterfaceTagAddDelReply)(nil),
2539                 (*WantInterfaceEvents)(nil),
2540                 (*WantInterfaceEventsReply)(nil),
2541         }
2542 }