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