189611946abd88fd523edd1720a6ad1b32e14b7f
[govpp.git] / binapi / bond / bond.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 bond contains generated bindings for API file bond.api.
7 //
8 // Contents:
9 //   2 enums
10 //  14 messages
11 //
12 package bond
13
14 import (
15         "strconv"
16
17         api "git.fd.io/govpp.git/api"
18         ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
19         interface_types "git.fd.io/govpp.git/binapi/interface_types"
20         codec "git.fd.io/govpp.git/codec"
21 )
22
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
28
29 const (
30         APIFile    = "bond"
31         APIVersion = "2.0.0"
32         VersionCrc = 0xa65a4a1e
33 )
34
35 // BondLbAlgo defines enum 'bond_lb_algo'.
36 type BondLbAlgo uint32
37
38 const (
39         BOND_API_LB_ALGO_L2  BondLbAlgo = 0
40         BOND_API_LB_ALGO_L34 BondLbAlgo = 1
41         BOND_API_LB_ALGO_L23 BondLbAlgo = 2
42         BOND_API_LB_ALGO_RR  BondLbAlgo = 3
43         BOND_API_LB_ALGO_BC  BondLbAlgo = 4
44         BOND_API_LB_ALGO_AB  BondLbAlgo = 5
45 )
46
47 var (
48         BondLbAlgo_name = map[uint32]string{
49                 0: "BOND_API_LB_ALGO_L2",
50                 1: "BOND_API_LB_ALGO_L34",
51                 2: "BOND_API_LB_ALGO_L23",
52                 3: "BOND_API_LB_ALGO_RR",
53                 4: "BOND_API_LB_ALGO_BC",
54                 5: "BOND_API_LB_ALGO_AB",
55         }
56         BondLbAlgo_value = map[string]uint32{
57                 "BOND_API_LB_ALGO_L2":  0,
58                 "BOND_API_LB_ALGO_L34": 1,
59                 "BOND_API_LB_ALGO_L23": 2,
60                 "BOND_API_LB_ALGO_RR":  3,
61                 "BOND_API_LB_ALGO_BC":  4,
62                 "BOND_API_LB_ALGO_AB":  5,
63         }
64 )
65
66 func (x BondLbAlgo) String() string {
67         s, ok := BondLbAlgo_name[uint32(x)]
68         if ok {
69                 return s
70         }
71         return "BondLbAlgo(" + strconv.Itoa(int(x)) + ")"
72 }
73
74 // BondMode defines enum 'bond_mode'.
75 type BondMode uint32
76
77 const (
78         BOND_API_MODE_ROUND_ROBIN   BondMode = 1
79         BOND_API_MODE_ACTIVE_BACKUP BondMode = 2
80         BOND_API_MODE_XOR           BondMode = 3
81         BOND_API_MODE_BROADCAST     BondMode = 4
82         BOND_API_MODE_LACP          BondMode = 5
83 )
84
85 var (
86         BondMode_name = map[uint32]string{
87                 1: "BOND_API_MODE_ROUND_ROBIN",
88                 2: "BOND_API_MODE_ACTIVE_BACKUP",
89                 3: "BOND_API_MODE_XOR",
90                 4: "BOND_API_MODE_BROADCAST",
91                 5: "BOND_API_MODE_LACP",
92         }
93         BondMode_value = map[string]uint32{
94                 "BOND_API_MODE_ROUND_ROBIN":   1,
95                 "BOND_API_MODE_ACTIVE_BACKUP": 2,
96                 "BOND_API_MODE_XOR":           3,
97                 "BOND_API_MODE_BROADCAST":     4,
98                 "BOND_API_MODE_LACP":          5,
99         }
100 )
101
102 func (x BondMode) String() string {
103         s, ok := BondMode_name[uint32(x)]
104         if ok {
105                 return s
106         }
107         return "BondMode(" + strconv.Itoa(int(x)) + ")"
108 }
109
110 // BondCreate defines message 'bond_create'.
111 type BondCreate struct {
112         ID           uint32                    `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
113         UseCustomMac bool                      `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
114         MacAddress   ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
115         Mode         BondMode                  `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
116         Lb           BondLbAlgo                `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
117         NumaOnly     bool                      `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
118 }
119
120 func (m *BondCreate) Reset()               { *m = BondCreate{} }
121 func (*BondCreate) GetMessageName() string { return "bond_create" }
122 func (*BondCreate) GetCrcString() string   { return "48883c7e" }
123 func (*BondCreate) GetMessageType() api.MessageType {
124         return api.RequestMessage
125 }
126
127 func (m *BondCreate) Size() (size int) {
128         if m == nil {
129                 return 0
130         }
131         size += 4     // m.ID
132         size += 1     // m.UseCustomMac
133         size += 1 * 6 // m.MacAddress
134         size += 4     // m.Mode
135         size += 4     // m.Lb
136         size += 1     // m.NumaOnly
137         return size
138 }
139 func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
140         if b == nil {
141                 b = make([]byte, m.Size())
142         }
143         buf := codec.NewBuffer(b)
144         buf.EncodeUint32(m.ID)
145         buf.EncodeBool(m.UseCustomMac)
146         buf.EncodeBytes(m.MacAddress[:], 6)
147         buf.EncodeUint32(uint32(m.Mode))
148         buf.EncodeUint32(uint32(m.Lb))
149         buf.EncodeBool(m.NumaOnly)
150         return buf.Bytes(), nil
151 }
152 func (m *BondCreate) Unmarshal(b []byte) error {
153         buf := codec.NewBuffer(b)
154         m.ID = buf.DecodeUint32()
155         m.UseCustomMac = buf.DecodeBool()
156         copy(m.MacAddress[:], buf.DecodeBytes(6))
157         m.Mode = BondMode(buf.DecodeUint32())
158         m.Lb = BondLbAlgo(buf.DecodeUint32())
159         m.NumaOnly = buf.DecodeBool()
160         return nil
161 }
162
163 // BondCreateReply defines message 'bond_create_reply'.
164 type BondCreateReply struct {
165         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
166         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
167 }
168
169 func (m *BondCreateReply) Reset()               { *m = BondCreateReply{} }
170 func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
171 func (*BondCreateReply) GetCrcString() string   { return "5383d31f" }
172 func (*BondCreateReply) GetMessageType() api.MessageType {
173         return api.ReplyMessage
174 }
175
176 func (m *BondCreateReply) Size() (size int) {
177         if m == nil {
178                 return 0
179         }
180         size += 4 // m.Retval
181         size += 4 // m.SwIfIndex
182         return size
183 }
184 func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
185         if b == nil {
186                 b = make([]byte, m.Size())
187         }
188         buf := codec.NewBuffer(b)
189         buf.EncodeInt32(m.Retval)
190         buf.EncodeUint32(uint32(m.SwIfIndex))
191         return buf.Bytes(), nil
192 }
193 func (m *BondCreateReply) Unmarshal(b []byte) error {
194         buf := codec.NewBuffer(b)
195         m.Retval = buf.DecodeInt32()
196         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
197         return nil
198 }
199
200 // BondDelete defines message 'bond_delete'.
201 type BondDelete struct {
202         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
203 }
204
205 func (m *BondDelete) Reset()               { *m = BondDelete{} }
206 func (*BondDelete) GetMessageName() string { return "bond_delete" }
207 func (*BondDelete) GetCrcString() string   { return "f9e6675e" }
208 func (*BondDelete) GetMessageType() api.MessageType {
209         return api.RequestMessage
210 }
211
212 func (m *BondDelete) Size() (size int) {
213         if m == nil {
214                 return 0
215         }
216         size += 4 // m.SwIfIndex
217         return size
218 }
219 func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
220         if b == nil {
221                 b = make([]byte, m.Size())
222         }
223         buf := codec.NewBuffer(b)
224         buf.EncodeUint32(uint32(m.SwIfIndex))
225         return buf.Bytes(), nil
226 }
227 func (m *BondDelete) Unmarshal(b []byte) error {
228         buf := codec.NewBuffer(b)
229         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
230         return nil
231 }
232
233 // BondDeleteReply defines message 'bond_delete_reply'.
234 type BondDeleteReply struct {
235         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
236 }
237
238 func (m *BondDeleteReply) Reset()               { *m = BondDeleteReply{} }
239 func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
240 func (*BondDeleteReply) GetCrcString() string   { return "e8d4e804" }
241 func (*BondDeleteReply) GetMessageType() api.MessageType {
242         return api.ReplyMessage
243 }
244
245 func (m *BondDeleteReply) Size() (size int) {
246         if m == nil {
247                 return 0
248         }
249         size += 4 // m.Retval
250         return size
251 }
252 func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
253         if b == nil {
254                 b = make([]byte, m.Size())
255         }
256         buf := codec.NewBuffer(b)
257         buf.EncodeInt32(m.Retval)
258         return buf.Bytes(), nil
259 }
260 func (m *BondDeleteReply) Unmarshal(b []byte) error {
261         buf := codec.NewBuffer(b)
262         m.Retval = buf.DecodeInt32()
263         return nil
264 }
265
266 // BondDetachSlave defines message 'bond_detach_slave'.
267 type BondDetachSlave struct {
268         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
269 }
270
271 func (m *BondDetachSlave) Reset()               { *m = BondDetachSlave{} }
272 func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
273 func (*BondDetachSlave) GetCrcString() string   { return "f9e6675e" }
274 func (*BondDetachSlave) GetMessageType() api.MessageType {
275         return api.RequestMessage
276 }
277
278 func (m *BondDetachSlave) Size() (size int) {
279         if m == nil {
280                 return 0
281         }
282         size += 4 // m.SwIfIndex
283         return size
284 }
285 func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
286         if b == nil {
287                 b = make([]byte, m.Size())
288         }
289         buf := codec.NewBuffer(b)
290         buf.EncodeUint32(uint32(m.SwIfIndex))
291         return buf.Bytes(), nil
292 }
293 func (m *BondDetachSlave) Unmarshal(b []byte) error {
294         buf := codec.NewBuffer(b)
295         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
296         return nil
297 }
298
299 // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
300 type BondDetachSlaveReply struct {
301         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
302 }
303
304 func (m *BondDetachSlaveReply) Reset()               { *m = BondDetachSlaveReply{} }
305 func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
306 func (*BondDetachSlaveReply) GetCrcString() string   { return "e8d4e804" }
307 func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
308         return api.ReplyMessage
309 }
310
311 func (m *BondDetachSlaveReply) Size() (size int) {
312         if m == nil {
313                 return 0
314         }
315         size += 4 // m.Retval
316         return size
317 }
318 func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
319         if b == nil {
320                 b = make([]byte, m.Size())
321         }
322         buf := codec.NewBuffer(b)
323         buf.EncodeInt32(m.Retval)
324         return buf.Bytes(), nil
325 }
326 func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
327         buf := codec.NewBuffer(b)
328         m.Retval = buf.DecodeInt32()
329         return nil
330 }
331
332 // BondEnslave defines message 'bond_enslave'.
333 type BondEnslave struct {
334         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
335         BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
336         IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
337         IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
338 }
339
340 func (m *BondEnslave) Reset()               { *m = BondEnslave{} }
341 func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
342 func (*BondEnslave) GetCrcString() string   { return "076ecfa7" }
343 func (*BondEnslave) GetMessageType() api.MessageType {
344         return api.RequestMessage
345 }
346
347 func (m *BondEnslave) Size() (size int) {
348         if m == nil {
349                 return 0
350         }
351         size += 4 // m.SwIfIndex
352         size += 4 // m.BondSwIfIndex
353         size += 1 // m.IsPassive
354         size += 1 // m.IsLongTimeout
355         return size
356 }
357 func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
358         if b == nil {
359                 b = make([]byte, m.Size())
360         }
361         buf := codec.NewBuffer(b)
362         buf.EncodeUint32(uint32(m.SwIfIndex))
363         buf.EncodeUint32(uint32(m.BondSwIfIndex))
364         buf.EncodeBool(m.IsPassive)
365         buf.EncodeBool(m.IsLongTimeout)
366         return buf.Bytes(), nil
367 }
368 func (m *BondEnslave) Unmarshal(b []byte) error {
369         buf := codec.NewBuffer(b)
370         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
371         m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
372         m.IsPassive = buf.DecodeBool()
373         m.IsLongTimeout = buf.DecodeBool()
374         return nil
375 }
376
377 // BondEnslaveReply defines message 'bond_enslave_reply'.
378 type BondEnslaveReply struct {
379         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
380 }
381
382 func (m *BondEnslaveReply) Reset()               { *m = BondEnslaveReply{} }
383 func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
384 func (*BondEnslaveReply) GetCrcString() string   { return "e8d4e804" }
385 func (*BondEnslaveReply) GetMessageType() api.MessageType {
386         return api.ReplyMessage
387 }
388
389 func (m *BondEnslaveReply) Size() (size int) {
390         if m == nil {
391                 return 0
392         }
393         size += 4 // m.Retval
394         return size
395 }
396 func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
397         if b == nil {
398                 b = make([]byte, m.Size())
399         }
400         buf := codec.NewBuffer(b)
401         buf.EncodeInt32(m.Retval)
402         return buf.Bytes(), nil
403 }
404 func (m *BondEnslaveReply) Unmarshal(b []byte) error {
405         buf := codec.NewBuffer(b)
406         m.Retval = buf.DecodeInt32()
407         return nil
408 }
409
410 // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
411 type SwInterfaceBondDetails struct {
412         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
413         ID            uint32                         `binapi:"u32,name=id" json:"id,omitempty"`
414         Mode          BondMode                       `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
415         Lb            BondLbAlgo                     `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
416         NumaOnly      bool                           `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
417         ActiveSlaves  uint32                         `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
418         Slaves        uint32                         `binapi:"u32,name=slaves" json:"slaves,omitempty"`
419         InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
420 }
421
422 func (m *SwInterfaceBondDetails) Reset()               { *m = SwInterfaceBondDetails{} }
423 func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
424 func (*SwInterfaceBondDetails) GetCrcString() string   { return "f5ef2106" }
425 func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
426         return api.ReplyMessage
427 }
428
429 func (m *SwInterfaceBondDetails) Size() (size int) {
430         if m == nil {
431                 return 0
432         }
433         size += 4  // m.SwIfIndex
434         size += 4  // m.ID
435         size += 4  // m.Mode
436         size += 4  // m.Lb
437         size += 1  // m.NumaOnly
438         size += 4  // m.ActiveSlaves
439         size += 4  // m.Slaves
440         size += 64 // m.InterfaceName
441         return size
442 }
443 func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
444         if b == nil {
445                 b = make([]byte, m.Size())
446         }
447         buf := codec.NewBuffer(b)
448         buf.EncodeUint32(uint32(m.SwIfIndex))
449         buf.EncodeUint32(m.ID)
450         buf.EncodeUint32(uint32(m.Mode))
451         buf.EncodeUint32(uint32(m.Lb))
452         buf.EncodeBool(m.NumaOnly)
453         buf.EncodeUint32(m.ActiveSlaves)
454         buf.EncodeUint32(m.Slaves)
455         buf.EncodeString(m.InterfaceName, 64)
456         return buf.Bytes(), nil
457 }
458 func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
459         buf := codec.NewBuffer(b)
460         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
461         m.ID = buf.DecodeUint32()
462         m.Mode = BondMode(buf.DecodeUint32())
463         m.Lb = BondLbAlgo(buf.DecodeUint32())
464         m.NumaOnly = buf.DecodeBool()
465         m.ActiveSlaves = buf.DecodeUint32()
466         m.Slaves = buf.DecodeUint32()
467         m.InterfaceName = buf.DecodeString(64)
468         return nil
469 }
470
471 // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
472 type SwInterfaceBondDump struct{}
473
474 func (m *SwInterfaceBondDump) Reset()               { *m = SwInterfaceBondDump{} }
475 func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
476 func (*SwInterfaceBondDump) GetCrcString() string   { return "51077d14" }
477 func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
478         return api.RequestMessage
479 }
480
481 func (m *SwInterfaceBondDump) Size() (size int) {
482         if m == nil {
483                 return 0
484         }
485         return size
486 }
487 func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
488         if b == nil {
489                 b = make([]byte, m.Size())
490         }
491         buf := codec.NewBuffer(b)
492         return buf.Bytes(), nil
493 }
494 func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
495         return nil
496 }
497
498 // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
499 type SwInterfaceSetBondWeight struct {
500         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
501         Weight    uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
502 }
503
504 func (m *SwInterfaceSetBondWeight) Reset()               { *m = SwInterfaceSetBondWeight{} }
505 func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
506 func (*SwInterfaceSetBondWeight) GetCrcString() string   { return "deb510a0" }
507 func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
508         return api.RequestMessage
509 }
510
511 func (m *SwInterfaceSetBondWeight) Size() (size int) {
512         if m == nil {
513                 return 0
514         }
515         size += 4 // m.SwIfIndex
516         size += 4 // m.Weight
517         return size
518 }
519 func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
520         if b == nil {
521                 b = make([]byte, m.Size())
522         }
523         buf := codec.NewBuffer(b)
524         buf.EncodeUint32(uint32(m.SwIfIndex))
525         buf.EncodeUint32(m.Weight)
526         return buf.Bytes(), nil
527 }
528 func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
529         buf := codec.NewBuffer(b)
530         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
531         m.Weight = buf.DecodeUint32()
532         return nil
533 }
534
535 // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
536 type SwInterfaceSetBondWeightReply struct {
537         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
538 }
539
540 func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
541 func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
542         return "sw_interface_set_bond_weight_reply"
543 }
544 func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
545 func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
546         return api.ReplyMessage
547 }
548
549 func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
550         if m == nil {
551                 return 0
552         }
553         size += 4 // m.Retval
554         return size
555 }
556 func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
557         if b == nil {
558                 b = make([]byte, m.Size())
559         }
560         buf := codec.NewBuffer(b)
561         buf.EncodeInt32(m.Retval)
562         return buf.Bytes(), nil
563 }
564 func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
565         buf := codec.NewBuffer(b)
566         m.Retval = buf.DecodeInt32()
567         return nil
568 }
569
570 // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
571 type SwInterfaceSlaveDetails struct {
572         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
573         InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
574         IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
575         IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
576         IsLocalNuma   bool                           `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
577         Weight        uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
578 }
579
580 func (m *SwInterfaceSlaveDetails) Reset()               { *m = SwInterfaceSlaveDetails{} }
581 func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
582 func (*SwInterfaceSlaveDetails) GetCrcString() string   { return "3c4a0e23" }
583 func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
584         return api.ReplyMessage
585 }
586
587 func (m *SwInterfaceSlaveDetails) Size() (size int) {
588         if m == nil {
589                 return 0
590         }
591         size += 4  // m.SwIfIndex
592         size += 64 // m.InterfaceName
593         size += 1  // m.IsPassive
594         size += 1  // m.IsLongTimeout
595         size += 1  // m.IsLocalNuma
596         size += 4  // m.Weight
597         return size
598 }
599 func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
600         if b == nil {
601                 b = make([]byte, m.Size())
602         }
603         buf := codec.NewBuffer(b)
604         buf.EncodeUint32(uint32(m.SwIfIndex))
605         buf.EncodeString(m.InterfaceName, 64)
606         buf.EncodeBool(m.IsPassive)
607         buf.EncodeBool(m.IsLongTimeout)
608         buf.EncodeBool(m.IsLocalNuma)
609         buf.EncodeUint32(m.Weight)
610         return buf.Bytes(), nil
611 }
612 func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
613         buf := codec.NewBuffer(b)
614         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
615         m.InterfaceName = buf.DecodeString(64)
616         m.IsPassive = buf.DecodeBool()
617         m.IsLongTimeout = buf.DecodeBool()
618         m.IsLocalNuma = buf.DecodeBool()
619         m.Weight = buf.DecodeUint32()
620         return nil
621 }
622
623 // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
624 type SwInterfaceSlaveDump struct {
625         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
626 }
627
628 func (m *SwInterfaceSlaveDump) Reset()               { *m = SwInterfaceSlaveDump{} }
629 func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
630 func (*SwInterfaceSlaveDump) GetCrcString() string   { return "f9e6675e" }
631 func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
632         return api.RequestMessage
633 }
634
635 func (m *SwInterfaceSlaveDump) Size() (size int) {
636         if m == nil {
637                 return 0
638         }
639         size += 4 // m.SwIfIndex
640         return size
641 }
642 func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
643         if b == nil {
644                 b = make([]byte, m.Size())
645         }
646         buf := codec.NewBuffer(b)
647         buf.EncodeUint32(uint32(m.SwIfIndex))
648         return buf.Bytes(), nil
649 }
650 func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
651         buf := codec.NewBuffer(b)
652         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
653         return nil
654 }
655
656 func init() { file_bond_binapi_init() }
657 func file_bond_binapi_init() {
658         api.RegisterMessage((*BondCreate)(nil), "bond_create_48883c7e")
659         api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
660         api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
661         api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
662         api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
663         api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
664         api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_076ecfa7")
665         api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
666         api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_f5ef2106")
667         api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
668         api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
669         api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
670         api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
671         api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
672 }
673
674 // Messages returns list of all messages in this module.
675 func AllMessages() []api.Message {
676         return []api.Message{
677                 (*BondCreate)(nil),
678                 (*BondCreateReply)(nil),
679                 (*BondDelete)(nil),
680                 (*BondDeleteReply)(nil),
681                 (*BondDetachSlave)(nil),
682                 (*BondDetachSlaveReply)(nil),
683                 (*BondEnslave)(nil),
684                 (*BondEnslaveReply)(nil),
685                 (*SwInterfaceBondDetails)(nil),
686                 (*SwInterfaceBondDump)(nil),
687                 (*SwInterfaceSetBondWeight)(nil),
688                 (*SwInterfaceSetBondWeightReply)(nil),
689                 (*SwInterfaceSlaveDetails)(nil),
690                 (*SwInterfaceSlaveDump)(nil),
691         }
692 }