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