binapigen: fix union size
[govpp.git] / binapi / interface / interface.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/core/interface.api.json
6
7 // Package interfaces contains generated bindings for API file interface.api.
8 //
9 // Contents:
10 //  57 messages
11 //
12 package interfaces
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
17         interface_types "git.fd.io/govpp.git/binapi/interface_types"
18         ip_types "git.fd.io/govpp.git/binapi/ip_types"
19         codec "git.fd.io/govpp.git/codec"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 const (
29         APIFile    = "interface"
30         APIVersion = "3.2.2"
31         VersionCrc = 0x58d4cf5a
32 )
33
34 // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
35 type CollectDetailedInterfaceStats struct {
36         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
37         EnableDisable bool                           `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
38 }
39
40 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
41 func (*CollectDetailedInterfaceStats) GetMessageName() string {
42         return "collect_detailed_interface_stats"
43 }
44 func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
45 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType {
46         return api.RequestMessage
47 }
48
49 func (m *CollectDetailedInterfaceStats) Size() (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 "cb371063" }
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 "5803d5c4" }
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 "17b69fa2" }
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 "f709f78d" }
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 "f6d7d024" }
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 "6a2b491a" }
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 // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
1571 type SwInterfaceSetIPDirectedBroadcast struct {
1572         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1573         Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
1574 }
1575
1576 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
1577 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
1578         return "sw_interface_set_ip_directed_broadcast"
1579 }
1580 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
1581 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType {
1582         return api.RequestMessage
1583 }
1584
1585 func (m *SwInterfaceSetIPDirectedBroadcast) Size() (size int) {
1586         if m == nil {
1587                 return 0
1588         }
1589         size += 4 // m.SwIfIndex
1590         size += 1 // m.Enable
1591         return size
1592 }
1593 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
1594         if b == nil {
1595                 b = make([]byte, m.Size())
1596         }
1597         buf := codec.NewBuffer(b)
1598         buf.EncodeUint32(uint32(m.SwIfIndex))
1599         buf.EncodeBool(m.Enable)
1600         return buf.Bytes(), nil
1601 }
1602 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error {
1603         buf := codec.NewBuffer(b)
1604         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1605         m.Enable = buf.DecodeBool()
1606         return nil
1607 }
1608
1609 // SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'.
1610 type SwInterfaceSetIPDirectedBroadcastReply struct {
1611         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1612 }
1613
1614 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
1615         *m = SwInterfaceSetIPDirectedBroadcastReply{}
1616 }
1617 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
1618         return "sw_interface_set_ip_directed_broadcast_reply"
1619 }
1620 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
1621 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
1622         return api.ReplyMessage
1623 }
1624
1625 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() (size int) {
1626         if m == nil {
1627                 return 0
1628         }
1629         size += 4 // m.Retval
1630         return size
1631 }
1632 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) {
1633         if b == nil {
1634                 b = make([]byte, m.Size())
1635         }
1636         buf := codec.NewBuffer(b)
1637         buf.EncodeInt32(m.Retval)
1638         return buf.Bytes(), nil
1639 }
1640 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error {
1641         buf := codec.NewBuffer(b)
1642         m.Retval = buf.DecodeInt32()
1643         return nil
1644 }
1645
1646 // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'.
1647 type SwInterfaceSetMacAddress struct {
1648         SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1649         MacAddress ethernet_types.MacAddress      `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
1650 }
1651
1652 func (m *SwInterfaceSetMacAddress) Reset()               { *m = SwInterfaceSetMacAddress{} }
1653 func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" }
1654 func (*SwInterfaceSetMacAddress) GetCrcString() string   { return "6aca746a" }
1655 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType {
1656         return api.RequestMessage
1657 }
1658
1659 func (m *SwInterfaceSetMacAddress) Size() (size int) {
1660         if m == nil {
1661                 return 0
1662         }
1663         size += 4     // m.SwIfIndex
1664         size += 1 * 6 // m.MacAddress
1665         return size
1666 }
1667 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
1668         if b == nil {
1669                 b = make([]byte, m.Size())
1670         }
1671         buf := codec.NewBuffer(b)
1672         buf.EncodeUint32(uint32(m.SwIfIndex))
1673         buf.EncodeBytes(m.MacAddress[:], 6)
1674         return buf.Bytes(), nil
1675 }
1676 func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error {
1677         buf := codec.NewBuffer(b)
1678         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1679         copy(m.MacAddress[:], buf.DecodeBytes(6))
1680         return nil
1681 }
1682
1683 // SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'.
1684 type SwInterfaceSetMacAddressReply struct {
1685         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1686 }
1687
1688 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
1689 func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
1690         return "sw_interface_set_mac_address_reply"
1691 }
1692 func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
1693 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType {
1694         return api.ReplyMessage
1695 }
1696
1697 func (m *SwInterfaceSetMacAddressReply) Size() (size int) {
1698         if m == nil {
1699                 return 0
1700         }
1701         size += 4 // m.Retval
1702         return size
1703 }
1704 func (m *SwInterfaceSetMacAddressReply) 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 *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error {
1713         buf := codec.NewBuffer(b)
1714         m.Retval = buf.DecodeInt32()
1715         return nil
1716 }
1717
1718 // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'.
1719 type SwInterfaceSetMtu struct {
1720         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1721         Mtu       []uint32                       `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
1722 }
1723
1724 func (m *SwInterfaceSetMtu) Reset()               { *m = SwInterfaceSetMtu{} }
1725 func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" }
1726 func (*SwInterfaceSetMtu) GetCrcString() string   { return "5cbe85e5" }
1727 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType {
1728         return api.RequestMessage
1729 }
1730
1731 func (m *SwInterfaceSetMtu) Size() (size int) {
1732         if m == nil {
1733                 return 0
1734         }
1735         size += 4     // m.SwIfIndex
1736         size += 4 * 4 // m.Mtu
1737         return size
1738 }
1739 func (m *SwInterfaceSetMtu) 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         for i := 0; i < 4; i++ {
1746                 var x uint32
1747                 if i < len(m.Mtu) {
1748                         x = uint32(m.Mtu[i])
1749                 }
1750                 buf.EncodeUint32(x)
1751         }
1752         return buf.Bytes(), nil
1753 }
1754 func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error {
1755         buf := codec.NewBuffer(b)
1756         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1757         m.Mtu = make([]uint32, 4)
1758         for i := 0; i < len(m.Mtu); i++ {
1759                 m.Mtu[i] = buf.DecodeUint32()
1760         }
1761         return nil
1762 }
1763
1764 // SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'.
1765 type SwInterfaceSetMtuReply struct {
1766         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1767 }
1768
1769 func (m *SwInterfaceSetMtuReply) Reset()               { *m = SwInterfaceSetMtuReply{} }
1770 func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" }
1771 func (*SwInterfaceSetMtuReply) GetCrcString() string   { return "e8d4e804" }
1772 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType {
1773         return api.ReplyMessage
1774 }
1775
1776 func (m *SwInterfaceSetMtuReply) Size() (size int) {
1777         if m == nil {
1778                 return 0
1779         }
1780         size += 4 // m.Retval
1781         return size
1782 }
1783 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) {
1784         if b == nil {
1785                 b = make([]byte, m.Size())
1786         }
1787         buf := codec.NewBuffer(b)
1788         buf.EncodeInt32(m.Retval)
1789         return buf.Bytes(), nil
1790 }
1791 func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error {
1792         buf := codec.NewBuffer(b)
1793         m.Retval = buf.DecodeInt32()
1794         return nil
1795 }
1796
1797 // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'.
1798 type SwInterfaceSetRxMode struct {
1799         SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1800         QueueIDValid bool                           `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
1801         QueueID      uint32                         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
1802         Mode         interface_types.RxMode         `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
1803 }
1804
1805 func (m *SwInterfaceSetRxMode) Reset()               { *m = SwInterfaceSetRxMode{} }
1806 func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" }
1807 func (*SwInterfaceSetRxMode) GetCrcString() string   { return "780f5cee" }
1808 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType {
1809         return api.RequestMessage
1810 }
1811
1812 func (m *SwInterfaceSetRxMode) Size() (size int) {
1813         if m == nil {
1814                 return 0
1815         }
1816         size += 4 // m.SwIfIndex
1817         size += 1 // m.QueueIDValid
1818         size += 4 // m.QueueID
1819         size += 4 // m.Mode
1820         return size
1821 }
1822 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
1823         if b == nil {
1824                 b = make([]byte, m.Size())
1825         }
1826         buf := codec.NewBuffer(b)
1827         buf.EncodeUint32(uint32(m.SwIfIndex))
1828         buf.EncodeBool(m.QueueIDValid)
1829         buf.EncodeUint32(m.QueueID)
1830         buf.EncodeUint32(uint32(m.Mode))
1831         return buf.Bytes(), nil
1832 }
1833 func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error {
1834         buf := codec.NewBuffer(b)
1835         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1836         m.QueueIDValid = buf.DecodeBool()
1837         m.QueueID = buf.DecodeUint32()
1838         m.Mode = interface_types.RxMode(buf.DecodeUint32())
1839         return nil
1840 }
1841
1842 // SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'.
1843 type SwInterfaceSetRxModeReply struct {
1844         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1845 }
1846
1847 func (m *SwInterfaceSetRxModeReply) Reset()               { *m = SwInterfaceSetRxModeReply{} }
1848 func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" }
1849 func (*SwInterfaceSetRxModeReply) GetCrcString() string   { return "e8d4e804" }
1850 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType {
1851         return api.ReplyMessage
1852 }
1853
1854 func (m *SwInterfaceSetRxModeReply) Size() (size int) {
1855         if m == nil {
1856                 return 0
1857         }
1858         size += 4 // m.Retval
1859         return size
1860 }
1861 func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) {
1862         if b == nil {
1863                 b = make([]byte, m.Size())
1864         }
1865         buf := codec.NewBuffer(b)
1866         buf.EncodeInt32(m.Retval)
1867         return buf.Bytes(), nil
1868 }
1869 func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error {
1870         buf := codec.NewBuffer(b)
1871         m.Retval = buf.DecodeInt32()
1872         return nil
1873 }
1874
1875 // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'.
1876 type SwInterfaceSetRxPlacement struct {
1877         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1878         QueueID   uint32                         `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
1879         WorkerID  uint32                         `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
1880         IsMain    bool                           `binapi:"bool,name=is_main" json:"is_main,omitempty"`
1881 }
1882
1883 func (m *SwInterfaceSetRxPlacement) Reset()               { *m = SwInterfaceSetRxPlacement{} }
1884 func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" }
1885 func (*SwInterfaceSetRxPlacement) GetCrcString() string   { return "db65f3c9" }
1886 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType {
1887         return api.RequestMessage
1888 }
1889
1890 func (m *SwInterfaceSetRxPlacement) Size() (size int) {
1891         if m == nil {
1892                 return 0
1893         }
1894         size += 4 // m.SwIfIndex
1895         size += 4 // m.QueueID
1896         size += 4 // m.WorkerID
1897         size += 1 // m.IsMain
1898         return size
1899 }
1900 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
1901         if b == nil {
1902                 b = make([]byte, m.Size())
1903         }
1904         buf := codec.NewBuffer(b)
1905         buf.EncodeUint32(uint32(m.SwIfIndex))
1906         buf.EncodeUint32(m.QueueID)
1907         buf.EncodeUint32(m.WorkerID)
1908         buf.EncodeBool(m.IsMain)
1909         return buf.Bytes(), nil
1910 }
1911 func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error {
1912         buf := codec.NewBuffer(b)
1913         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1914         m.QueueID = buf.DecodeUint32()
1915         m.WorkerID = buf.DecodeUint32()
1916         m.IsMain = buf.DecodeBool()
1917         return nil
1918 }
1919
1920 // SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'.
1921 type SwInterfaceSetRxPlacementReply struct {
1922         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1923 }
1924
1925 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
1926 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
1927         return "sw_interface_set_rx_placement_reply"
1928 }
1929 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
1930 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType {
1931         return api.ReplyMessage
1932 }
1933
1934 func (m *SwInterfaceSetRxPlacementReply) Size() (size int) {
1935         if m == nil {
1936                 return 0
1937         }
1938         size += 4 // m.Retval
1939         return size
1940 }
1941 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) {
1942         if b == nil {
1943                 b = make([]byte, m.Size())
1944         }
1945         buf := codec.NewBuffer(b)
1946         buf.EncodeInt32(m.Retval)
1947         return buf.Bytes(), nil
1948 }
1949 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error {
1950         buf := codec.NewBuffer(b)
1951         m.Retval = buf.DecodeInt32()
1952         return nil
1953 }
1954
1955 // SwInterfaceSetTable defines message 'sw_interface_set_table'.
1956 type SwInterfaceSetTable struct {
1957         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1958         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1959         VrfID     uint32                         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1960 }
1961
1962 func (m *SwInterfaceSetTable) Reset()               { *m = SwInterfaceSetTable{} }
1963 func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" }
1964 func (*SwInterfaceSetTable) GetCrcString() string   { return "df42a577" }
1965 func (*SwInterfaceSetTable) GetMessageType() api.MessageType {
1966         return api.RequestMessage
1967 }
1968
1969 func (m *SwInterfaceSetTable) Size() (size int) {
1970         if m == nil {
1971                 return 0
1972         }
1973         size += 4 // m.SwIfIndex
1974         size += 1 // m.IsIPv6
1975         size += 4 // m.VrfID
1976         return size
1977 }
1978 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
1979         if b == nil {
1980                 b = make([]byte, m.Size())
1981         }
1982         buf := codec.NewBuffer(b)
1983         buf.EncodeUint32(uint32(m.SwIfIndex))
1984         buf.EncodeBool(m.IsIPv6)
1985         buf.EncodeUint32(m.VrfID)
1986         return buf.Bytes(), nil
1987 }
1988 func (m *SwInterfaceSetTable) Unmarshal(b []byte) error {
1989         buf := codec.NewBuffer(b)
1990         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1991         m.IsIPv6 = buf.DecodeBool()
1992         m.VrfID = buf.DecodeUint32()
1993         return nil
1994 }
1995
1996 // SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'.
1997 type SwInterfaceSetTableReply struct {
1998         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1999 }
2000
2001 func (m *SwInterfaceSetTableReply) Reset()               { *m = SwInterfaceSetTableReply{} }
2002 func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" }
2003 func (*SwInterfaceSetTableReply) GetCrcString() string   { return "e8d4e804" }
2004 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType {
2005         return api.ReplyMessage
2006 }
2007
2008 func (m *SwInterfaceSetTableReply) Size() (size int) {
2009         if m == nil {
2010                 return 0
2011         }
2012         size += 4 // m.Retval
2013         return size
2014 }
2015 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) {
2016         if b == nil {
2017                 b = make([]byte, m.Size())
2018         }
2019         buf := codec.NewBuffer(b)
2020         buf.EncodeInt32(m.Retval)
2021         return buf.Bytes(), nil
2022 }
2023 func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
2024         buf := codec.NewBuffer(b)
2025         m.Retval = buf.DecodeInt32()
2026         return nil
2027 }
2028
2029 // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
2030 type SwInterfaceSetUnnumbered struct {
2031         SwIfIndex           interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2032         UnnumberedSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
2033         IsAdd               bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2034 }
2035
2036 func (m *SwInterfaceSetUnnumbered) Reset()               { *m = SwInterfaceSetUnnumbered{} }
2037 func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" }
2038 func (*SwInterfaceSetUnnumbered) GetCrcString() string   { return "938ef33b" }
2039 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType {
2040         return api.RequestMessage
2041 }
2042
2043 func (m *SwInterfaceSetUnnumbered) Size() (size int) {
2044         if m == nil {
2045                 return 0
2046         }
2047         size += 4 // m.SwIfIndex
2048         size += 4 // m.UnnumberedSwIfIndex
2049         size += 1 // m.IsAdd
2050         return size
2051 }
2052 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
2053         if b == nil {
2054                 b = make([]byte, m.Size())
2055         }
2056         buf := codec.NewBuffer(b)
2057         buf.EncodeUint32(uint32(m.SwIfIndex))
2058         buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex))
2059         buf.EncodeBool(m.IsAdd)
2060         return buf.Bytes(), nil
2061 }
2062 func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error {
2063         buf := codec.NewBuffer(b)
2064         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2065         m.UnnumberedSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2066         m.IsAdd = buf.DecodeBool()
2067         return nil
2068 }
2069
2070 // SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'.
2071 type SwInterfaceSetUnnumberedReply struct {
2072         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2073 }
2074
2075 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
2076 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
2077         return "sw_interface_set_unnumbered_reply"
2078 }
2079 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
2080 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType {
2081         return api.ReplyMessage
2082 }
2083
2084 func (m *SwInterfaceSetUnnumberedReply) Size() (size int) {
2085         if m == nil {
2086                 return 0
2087         }
2088         size += 4 // m.Retval
2089         return size
2090 }
2091 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) {
2092         if b == nil {
2093                 b = make([]byte, m.Size())
2094         }
2095         buf := codec.NewBuffer(b)
2096         buf.EncodeInt32(m.Retval)
2097         return buf.Bytes(), nil
2098 }
2099 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error {
2100         buf := codec.NewBuffer(b)
2101         m.Retval = buf.DecodeInt32()
2102         return nil
2103 }
2104
2105 // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'.
2106 type SwInterfaceTagAddDel struct {
2107         IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2108         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2109         Tag       string                         `binapi:"string[64],name=tag" json:"tag,omitempty"`
2110 }
2111
2112 func (m *SwInterfaceTagAddDel) Reset()               { *m = SwInterfaceTagAddDel{} }
2113 func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" }
2114 func (*SwInterfaceTagAddDel) GetCrcString() string   { return "426f8bc1" }
2115 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType {
2116         return api.RequestMessage
2117 }
2118
2119 func (m *SwInterfaceTagAddDel) Size() (size int) {
2120         if m == nil {
2121                 return 0
2122         }
2123         size += 1  // m.IsAdd
2124         size += 4  // m.SwIfIndex
2125         size += 64 // m.Tag
2126         return size
2127 }
2128 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
2129         if b == nil {
2130                 b = make([]byte, m.Size())
2131         }
2132         buf := codec.NewBuffer(b)
2133         buf.EncodeBool(m.IsAdd)
2134         buf.EncodeUint32(uint32(m.SwIfIndex))
2135         buf.EncodeString(m.Tag, 64)
2136         return buf.Bytes(), nil
2137 }
2138 func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error {
2139         buf := codec.NewBuffer(b)
2140         m.IsAdd = buf.DecodeBool()
2141         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2142         m.Tag = buf.DecodeString(64)
2143         return nil
2144 }
2145
2146 // SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'.
2147 type SwInterfaceTagAddDelReply struct {
2148         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2149 }
2150
2151 func (m *SwInterfaceTagAddDelReply) Reset()               { *m = SwInterfaceTagAddDelReply{} }
2152 func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" }
2153 func (*SwInterfaceTagAddDelReply) GetCrcString() string   { return "e8d4e804" }
2154 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType {
2155         return api.ReplyMessage
2156 }
2157
2158 func (m *SwInterfaceTagAddDelReply) Size() (size int) {
2159         if m == nil {
2160                 return 0
2161         }
2162         size += 4 // m.Retval
2163         return size
2164 }
2165 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) {
2166         if b == nil {
2167                 b = make([]byte, m.Size())
2168         }
2169         buf := codec.NewBuffer(b)
2170         buf.EncodeInt32(m.Retval)
2171         return buf.Bytes(), nil
2172 }
2173 func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
2174         buf := codec.NewBuffer(b)
2175         m.Retval = buf.DecodeInt32()
2176         return nil
2177 }
2178
2179 // WantInterfaceEvents defines message 'want_interface_events'.
2180 type WantInterfaceEvents struct {
2181         EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
2182         PID           uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
2183 }
2184
2185 func (m *WantInterfaceEvents) Reset()               { *m = WantInterfaceEvents{} }
2186 func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" }
2187 func (*WantInterfaceEvents) GetCrcString() string   { return "476f5a08" }
2188 func (*WantInterfaceEvents) GetMessageType() api.MessageType {
2189         return api.RequestMessage
2190 }
2191
2192 func (m *WantInterfaceEvents) Size() (size int) {
2193         if m == nil {
2194                 return 0
2195         }
2196         size += 4 // m.EnableDisable
2197         size += 4 // m.PID
2198         return size
2199 }
2200 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
2201         if b == nil {
2202                 b = make([]byte, m.Size())
2203         }
2204         buf := codec.NewBuffer(b)
2205         buf.EncodeUint32(m.EnableDisable)
2206         buf.EncodeUint32(m.PID)
2207         return buf.Bytes(), nil
2208 }
2209 func (m *WantInterfaceEvents) Unmarshal(b []byte) error {
2210         buf := codec.NewBuffer(b)
2211         m.EnableDisable = buf.DecodeUint32()
2212         m.PID = buf.DecodeUint32()
2213         return nil
2214 }
2215
2216 // WantInterfaceEventsReply defines message 'want_interface_events_reply'.
2217 type WantInterfaceEventsReply struct {
2218         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2219 }
2220
2221 func (m *WantInterfaceEventsReply) Reset()               { *m = WantInterfaceEventsReply{} }
2222 func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" }
2223 func (*WantInterfaceEventsReply) GetCrcString() string   { return "e8d4e804" }
2224 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType {
2225         return api.ReplyMessage
2226 }
2227
2228 func (m *WantInterfaceEventsReply) Size() (size int) {
2229         if m == nil {
2230                 return 0
2231         }
2232         size += 4 // m.Retval
2233         return size
2234 }
2235 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) {
2236         if b == nil {
2237                 b = make([]byte, m.Size())
2238         }
2239         buf := codec.NewBuffer(b)
2240         buf.EncodeInt32(m.Retval)
2241         return buf.Bytes(), nil
2242 }
2243 func (m *WantInterfaceEventsReply) Unmarshal(b []byte) error {
2244         buf := codec.NewBuffer(b)
2245         m.Retval = buf.DecodeInt32()
2246         return nil
2247 }
2248
2249 func init() { file_interfaces_binapi_init() }
2250 func file_interfaces_binapi_init() {
2251         api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee")
2252         api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804")
2253         api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22")
2254         api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2")
2255         api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f")
2256         api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f")
2257         api.RegisterMessage((*CreateSubif)(nil), "create_subif_cb371063")
2258         api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f")
2259         api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b")
2260         api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f")
2261         api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e")
2262         api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804")
2263         api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e")
2264         api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804")
2265         api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899")
2266         api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804")
2267         api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8")
2268         api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804")
2269         api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5803d5c4")
2270         api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804")
2271         api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4")
2272         api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804")
2273         api.RegisterMessage((*SwInterfaceAddressReplaceBegin)(nil), "sw_interface_address_replace_begin_51077d14")
2274         api.RegisterMessage((*SwInterfaceAddressReplaceBeginReply)(nil), "sw_interface_address_replace_begin_reply_e8d4e804")
2275         api.RegisterMessage((*SwInterfaceAddressReplaceEnd)(nil), "sw_interface_address_replace_end_51077d14")
2276         api.RegisterMessage((*SwInterfaceAddressReplaceEndReply)(nil), "sw_interface_address_replace_end_reply_e8d4e804")
2277         api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e")
2278         api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804")
2279         api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_17b69fa2")
2280         api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27")
2281         api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_f709f78d")
2282         api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e")
2283         api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08")
2284         api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4")
2285         api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109")
2286         api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_f6d7d024")
2287         api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
2288         api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_6a2b491a")
2289         api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
2290         api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
2291         api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
2292         api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_6aca746a")
2293         api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804")
2294         api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5")
2295         api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804")
2296         api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_780f5cee")
2297         api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804")
2298         api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9")
2299         api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
2300         api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
2301         api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
2302         api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_938ef33b")
2303         api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
2304         api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
2305         api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
2306         api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
2307         api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
2308 }
2309
2310 // Messages returns list of all messages in this module.
2311 func AllMessages() []api.Message {
2312         return []api.Message{
2313                 (*CollectDetailedInterfaceStats)(nil),
2314                 (*CollectDetailedInterfaceStatsReply)(nil),
2315                 (*CreateLoopback)(nil),
2316                 (*CreateLoopbackInstance)(nil),
2317                 (*CreateLoopbackInstanceReply)(nil),
2318                 (*CreateLoopbackReply)(nil),
2319                 (*CreateSubif)(nil),
2320                 (*CreateSubifReply)(nil),
2321                 (*CreateVlanSubif)(nil),
2322                 (*CreateVlanSubifReply)(nil),
2323                 (*DeleteLoopback)(nil),
2324                 (*DeleteLoopbackReply)(nil),
2325                 (*DeleteSubif)(nil),
2326                 (*DeleteSubifReply)(nil),
2327                 (*HwInterfaceSetMtu)(nil),
2328                 (*HwInterfaceSetMtuReply)(nil),
2329                 (*InterfaceNameRenumber)(nil),
2330                 (*InterfaceNameRenumberReply)(nil),
2331                 (*SwInterfaceAddDelAddress)(nil),
2332                 (*SwInterfaceAddDelAddressReply)(nil),
2333                 (*SwInterfaceAddDelMacAddress)(nil),
2334                 (*SwInterfaceAddDelMacAddressReply)(nil),
2335                 (*SwInterfaceAddressReplaceBegin)(nil),
2336                 (*SwInterfaceAddressReplaceBeginReply)(nil),
2337                 (*SwInterfaceAddressReplaceEnd)(nil),
2338                 (*SwInterfaceAddressReplaceEndReply)(nil),
2339                 (*SwInterfaceClearStats)(nil),
2340                 (*SwInterfaceClearStatsReply)(nil),
2341                 (*SwInterfaceDetails)(nil),
2342                 (*SwInterfaceDump)(nil),
2343                 (*SwInterfaceEvent)(nil),
2344                 (*SwInterfaceGetMacAddress)(nil),
2345                 (*SwInterfaceGetMacAddressReply)(nil),
2346                 (*SwInterfaceGetTable)(nil),
2347                 (*SwInterfaceGetTableReply)(nil),
2348                 (*SwInterfaceRxPlacementDetails)(nil),
2349                 (*SwInterfaceRxPlacementDump)(nil),
2350                 (*SwInterfaceSetFlags)(nil),
2351                 (*SwInterfaceSetFlagsReply)(nil),
2352                 (*SwInterfaceSetIPDirectedBroadcast)(nil),
2353                 (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
2354                 (*SwInterfaceSetMacAddress)(nil),
2355                 (*SwInterfaceSetMacAddressReply)(nil),
2356                 (*SwInterfaceSetMtu)(nil),
2357                 (*SwInterfaceSetMtuReply)(nil),
2358                 (*SwInterfaceSetRxMode)(nil),
2359                 (*SwInterfaceSetRxModeReply)(nil),
2360                 (*SwInterfaceSetRxPlacement)(nil),
2361                 (*SwInterfaceSetRxPlacementReply)(nil),
2362                 (*SwInterfaceSetTable)(nil),
2363                 (*SwInterfaceSetTableReply)(nil),
2364                 (*SwInterfaceSetUnnumbered)(nil),
2365                 (*SwInterfaceSetUnnumberedReply)(nil),
2366                 (*SwInterfaceTagAddDel)(nil),
2367                 (*SwInterfaceTagAddDelReply)(nil),
2368                 (*WantInterfaceEvents)(nil),
2369                 (*WantInterfaceEventsReply)(nil),
2370         }
2371 }