6c9751cfcdd449930a576d0fcbdf3096c73860ef
[govpp.git] / binapi / mpls / mpls.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 mpls contains generated bindings for API file mpls.api.
7 //
8 // Contents:
9 //   3 structs
10 //  16 messages
11 //
12 package mpls
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         fib_types "git.fd.io/govpp.git/binapi/fib_types"
17         interface_types "git.fd.io/govpp.git/binapi/interface_types"
18         ip_types "git.fd.io/govpp.git/binapi/ip_types"
19         codec "git.fd.io/govpp.git/codec"
20 )
21
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
27
28 const (
29         APIFile    = "mpls"
30         APIVersion = "1.1.1"
31         VersionCrc = 0xd83a030f
32 )
33
34 // MplsRoute defines type 'mpls_route'.
35 type MplsRoute struct {
36         MrTableID     uint32              `binapi:"u32,name=mr_table_id" json:"mr_table_id,omitempty"`
37         MrLabel       uint32              `binapi:"u32,name=mr_label" json:"mr_label,omitempty"`
38         MrEos         uint8               `binapi:"u8,name=mr_eos" json:"mr_eos,omitempty"`
39         MrEosProto    uint8               `binapi:"u8,name=mr_eos_proto" json:"mr_eos_proto,omitempty"`
40         MrIsMulticast bool                `binapi:"bool,name=mr_is_multicast" json:"mr_is_multicast,omitempty"`
41         MrNPaths      uint8               `binapi:"u8,name=mr_n_paths" json:"-"`
42         MrPaths       []fib_types.FibPath `binapi:"fib_path[mr_n_paths],name=mr_paths" json:"mr_paths,omitempty"`
43 }
44
45 // MplsTable defines type 'mpls_table'.
46 type MplsTable struct {
47         MtTableID uint32 `binapi:"u32,name=mt_table_id" json:"mt_table_id,omitempty"`
48         MtName    string `binapi:"string[64],name=mt_name" json:"mt_name,omitempty"`
49 }
50
51 // MplsTunnel defines type 'mpls_tunnel'.
52 type MplsTunnel struct {
53         MtSwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=mt_sw_if_index" json:"mt_sw_if_index,omitempty"`
54         MtTunnelIndex uint32                         `binapi:"u32,name=mt_tunnel_index" json:"mt_tunnel_index,omitempty"`
55         MtL2Only      bool                           `binapi:"bool,name=mt_l2_only" json:"mt_l2_only,omitempty"`
56         MtIsMulticast bool                           `binapi:"bool,name=mt_is_multicast" json:"mt_is_multicast,omitempty"`
57         MtTag         string                         `binapi:"string[64],name=mt_tag" json:"mt_tag,omitempty"`
58         MtNPaths      uint8                          `binapi:"u8,name=mt_n_paths" json:"-"`
59         MtPaths       []fib_types.FibPath            `binapi:"fib_path[mt_n_paths],name=mt_paths" json:"mt_paths,omitempty"`
60 }
61
62 // MplsIPBindUnbind defines message 'mpls_ip_bind_unbind'.
63 type MplsIPBindUnbind struct {
64         MbMplsTableID uint32          `binapi:"u32,name=mb_mpls_table_id" json:"mb_mpls_table_id,omitempty"`
65         MbLabel       uint32          `binapi:"u32,name=mb_label" json:"mb_label,omitempty"`
66         MbIPTableID   uint32          `binapi:"u32,name=mb_ip_table_id" json:"mb_ip_table_id,omitempty"`
67         MbIsBind      bool            `binapi:"bool,name=mb_is_bind" json:"mb_is_bind,omitempty"`
68         MbPrefix      ip_types.Prefix `binapi:"prefix,name=mb_prefix" json:"mb_prefix,omitempty"`
69 }
70
71 func (m *MplsIPBindUnbind) Reset()               { *m = MplsIPBindUnbind{} }
72 func (*MplsIPBindUnbind) GetMessageName() string { return "mpls_ip_bind_unbind" }
73 func (*MplsIPBindUnbind) GetCrcString() string   { return "48249a27" }
74 func (*MplsIPBindUnbind) GetMessageType() api.MessageType {
75         return api.RequestMessage
76 }
77
78 func (m *MplsIPBindUnbind) Size() (size int) {
79         if m == nil {
80                 return 0
81         }
82         size += 4      // m.MbMplsTableID
83         size += 4      // m.MbLabel
84         size += 4      // m.MbIPTableID
85         size += 1      // m.MbIsBind
86         size += 1      // m.MbPrefix.Address.Af
87         size += 1 * 16 // m.MbPrefix.Address.Un
88         size += 1      // m.MbPrefix.Len
89         return size
90 }
91 func (m *MplsIPBindUnbind) Marshal(b []byte) ([]byte, error) {
92         if b == nil {
93                 b = make([]byte, m.Size())
94         }
95         buf := codec.NewBuffer(b)
96         buf.EncodeUint32(m.MbMplsTableID)
97         buf.EncodeUint32(m.MbLabel)
98         buf.EncodeUint32(m.MbIPTableID)
99         buf.EncodeBool(m.MbIsBind)
100         buf.EncodeUint8(uint8(m.MbPrefix.Address.Af))
101         buf.EncodeBytes(m.MbPrefix.Address.Un.XXX_UnionData[:], 16)
102         buf.EncodeUint8(m.MbPrefix.Len)
103         return buf.Bytes(), nil
104 }
105 func (m *MplsIPBindUnbind) Unmarshal(b []byte) error {
106         buf := codec.NewBuffer(b)
107         m.MbMplsTableID = buf.DecodeUint32()
108         m.MbLabel = buf.DecodeUint32()
109         m.MbIPTableID = buf.DecodeUint32()
110         m.MbIsBind = buf.DecodeBool()
111         m.MbPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
112         copy(m.MbPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
113         m.MbPrefix.Len = buf.DecodeUint8()
114         return nil
115 }
116
117 // MplsIPBindUnbindReply defines message 'mpls_ip_bind_unbind_reply'.
118 type MplsIPBindUnbindReply struct {
119         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
120 }
121
122 func (m *MplsIPBindUnbindReply) Reset()               { *m = MplsIPBindUnbindReply{} }
123 func (*MplsIPBindUnbindReply) GetMessageName() string { return "mpls_ip_bind_unbind_reply" }
124 func (*MplsIPBindUnbindReply) GetCrcString() string   { return "e8d4e804" }
125 func (*MplsIPBindUnbindReply) GetMessageType() api.MessageType {
126         return api.ReplyMessage
127 }
128
129 func (m *MplsIPBindUnbindReply) Size() (size int) {
130         if m == nil {
131                 return 0
132         }
133         size += 4 // m.Retval
134         return size
135 }
136 func (m *MplsIPBindUnbindReply) Marshal(b []byte) ([]byte, error) {
137         if b == nil {
138                 b = make([]byte, m.Size())
139         }
140         buf := codec.NewBuffer(b)
141         buf.EncodeInt32(m.Retval)
142         return buf.Bytes(), nil
143 }
144 func (m *MplsIPBindUnbindReply) Unmarshal(b []byte) error {
145         buf := codec.NewBuffer(b)
146         m.Retval = buf.DecodeInt32()
147         return nil
148 }
149
150 // MplsRouteAddDel defines message 'mpls_route_add_del'.
151 type MplsRouteAddDel struct {
152         MrIsAdd       bool      `binapi:"bool,name=mr_is_add" json:"mr_is_add,omitempty"`
153         MrIsMultipath bool      `binapi:"bool,name=mr_is_multipath" json:"mr_is_multipath,omitempty"`
154         MrRoute       MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"`
155 }
156
157 func (m *MplsRouteAddDel) Reset()               { *m = MplsRouteAddDel{} }
158 func (*MplsRouteAddDel) GetMessageName() string { return "mpls_route_add_del" }
159 func (*MplsRouteAddDel) GetCrcString() string   { return "343cff54" }
160 func (*MplsRouteAddDel) GetMessageType() api.MessageType {
161         return api.RequestMessage
162 }
163
164 func (m *MplsRouteAddDel) Size() (size int) {
165         if m == nil {
166                 return 0
167         }
168         size += 1 // m.MrIsAdd
169         size += 1 // m.MrIsMultipath
170         size += 4 // m.MrRoute.MrTableID
171         size += 4 // m.MrRoute.MrLabel
172         size += 1 // m.MrRoute.MrEos
173         size += 1 // m.MrRoute.MrEosProto
174         size += 1 // m.MrRoute.MrIsMulticast
175         size += 1 // m.MrRoute.MrNPaths
176         for j2 := 0; j2 < len(m.MrRoute.MrPaths); j2++ {
177                 var s2 fib_types.FibPath
178                 _ = s2
179                 if j2 < len(m.MrRoute.MrPaths) {
180                         s2 = m.MrRoute.MrPaths[j2]
181                 }
182                 size += 4      // s2.SwIfIndex
183                 size += 4      // s2.TableID
184                 size += 4      // s2.RpfID
185                 size += 1      // s2.Weight
186                 size += 1      // s2.Preference
187                 size += 4      // s2.Type
188                 size += 4      // s2.Flags
189                 size += 4      // s2.Proto
190                 size += 1 * 16 // s2.Nh.Address
191                 size += 4      // s2.Nh.ViaLabel
192                 size += 4      // s2.Nh.ObjID
193                 size += 4      // s2.Nh.ClassifyTableIndex
194                 size += 1      // s2.NLabels
195                 for j3 := 0; j3 < 16; j3++ {
196                         size += 1 // s2.LabelStack[j3].IsUniform
197                         size += 4 // s2.LabelStack[j3].Label
198                         size += 1 // s2.LabelStack[j3].TTL
199                         size += 1 // s2.LabelStack[j3].Exp
200                 }
201         }
202         return size
203 }
204 func (m *MplsRouteAddDel) Marshal(b []byte) ([]byte, error) {
205         if b == nil {
206                 b = make([]byte, m.Size())
207         }
208         buf := codec.NewBuffer(b)
209         buf.EncodeBool(m.MrIsAdd)
210         buf.EncodeBool(m.MrIsMultipath)
211         buf.EncodeUint32(m.MrRoute.MrTableID)
212         buf.EncodeUint32(m.MrRoute.MrLabel)
213         buf.EncodeUint8(m.MrRoute.MrEos)
214         buf.EncodeUint8(m.MrRoute.MrEosProto)
215         buf.EncodeBool(m.MrRoute.MrIsMulticast)
216         buf.EncodeUint8(uint8(len(m.MrRoute.MrPaths)))
217         for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
218                 var v1 fib_types.FibPath // MrPaths
219                 if j1 < len(m.MrRoute.MrPaths) {
220                         v1 = m.MrRoute.MrPaths[j1]
221                 }
222                 buf.EncodeUint32(v1.SwIfIndex)
223                 buf.EncodeUint32(v1.TableID)
224                 buf.EncodeUint32(v1.RpfID)
225                 buf.EncodeUint8(v1.Weight)
226                 buf.EncodeUint8(v1.Preference)
227                 buf.EncodeUint32(uint32(v1.Type))
228                 buf.EncodeUint32(uint32(v1.Flags))
229                 buf.EncodeUint32(uint32(v1.Proto))
230                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
231                 buf.EncodeUint32(v1.Nh.ViaLabel)
232                 buf.EncodeUint32(v1.Nh.ObjID)
233                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
234                 buf.EncodeUint8(v1.NLabels)
235                 for j2 := 0; j2 < 16; j2++ {
236                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
237                         buf.EncodeUint32(v1.LabelStack[j2].Label)
238                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
239                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
240                 }
241         }
242         return buf.Bytes(), nil
243 }
244 func (m *MplsRouteAddDel) Unmarshal(b []byte) error {
245         buf := codec.NewBuffer(b)
246         m.MrIsAdd = buf.DecodeBool()
247         m.MrIsMultipath = buf.DecodeBool()
248         m.MrRoute.MrTableID = buf.DecodeUint32()
249         m.MrRoute.MrLabel = buf.DecodeUint32()
250         m.MrRoute.MrEos = buf.DecodeUint8()
251         m.MrRoute.MrEosProto = buf.DecodeUint8()
252         m.MrRoute.MrIsMulticast = buf.DecodeBool()
253         m.MrRoute.MrNPaths = buf.DecodeUint8()
254         m.MrRoute.MrPaths = make([]fib_types.FibPath, m.MrRoute.MrNPaths)
255         for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
256                 m.MrRoute.MrPaths[j1].SwIfIndex = buf.DecodeUint32()
257                 m.MrRoute.MrPaths[j1].TableID = buf.DecodeUint32()
258                 m.MrRoute.MrPaths[j1].RpfID = buf.DecodeUint32()
259                 m.MrRoute.MrPaths[j1].Weight = buf.DecodeUint8()
260                 m.MrRoute.MrPaths[j1].Preference = buf.DecodeUint8()
261                 m.MrRoute.MrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
262                 m.MrRoute.MrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
263                 m.MrRoute.MrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
264                 copy(m.MrRoute.MrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
265                 m.MrRoute.MrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
266                 m.MrRoute.MrPaths[j1].Nh.ObjID = buf.DecodeUint32()
267                 m.MrRoute.MrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
268                 m.MrRoute.MrPaths[j1].NLabels = buf.DecodeUint8()
269                 for j2 := 0; j2 < 16; j2++ {
270                         m.MrRoute.MrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
271                         m.MrRoute.MrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
272                         m.MrRoute.MrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
273                         m.MrRoute.MrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
274                 }
275         }
276         return nil
277 }
278
279 // MplsRouteAddDelReply defines message 'mpls_route_add_del_reply'.
280 type MplsRouteAddDelReply struct {
281         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
282         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
283 }
284
285 func (m *MplsRouteAddDelReply) Reset()               { *m = MplsRouteAddDelReply{} }
286 func (*MplsRouteAddDelReply) GetMessageName() string { return "mpls_route_add_del_reply" }
287 func (*MplsRouteAddDelReply) GetCrcString() string   { return "1992deab" }
288 func (*MplsRouteAddDelReply) GetMessageType() api.MessageType {
289         return api.ReplyMessage
290 }
291
292 func (m *MplsRouteAddDelReply) Size() (size int) {
293         if m == nil {
294                 return 0
295         }
296         size += 4 // m.Retval
297         size += 4 // m.StatsIndex
298         return size
299 }
300 func (m *MplsRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
301         if b == nil {
302                 b = make([]byte, m.Size())
303         }
304         buf := codec.NewBuffer(b)
305         buf.EncodeInt32(m.Retval)
306         buf.EncodeUint32(m.StatsIndex)
307         return buf.Bytes(), nil
308 }
309 func (m *MplsRouteAddDelReply) Unmarshal(b []byte) error {
310         buf := codec.NewBuffer(b)
311         m.Retval = buf.DecodeInt32()
312         m.StatsIndex = buf.DecodeUint32()
313         return nil
314 }
315
316 // MplsRouteDetails defines message 'mpls_route_details'.
317 type MplsRouteDetails struct {
318         MrRoute MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"`
319 }
320
321 func (m *MplsRouteDetails) Reset()               { *m = MplsRouteDetails{} }
322 func (*MplsRouteDetails) GetMessageName() string { return "mpls_route_details" }
323 func (*MplsRouteDetails) GetCrcString() string   { return "d0ac384c" }
324 func (*MplsRouteDetails) GetMessageType() api.MessageType {
325         return api.ReplyMessage
326 }
327
328 func (m *MplsRouteDetails) Size() (size int) {
329         if m == nil {
330                 return 0
331         }
332         size += 4 // m.MrRoute.MrTableID
333         size += 4 // m.MrRoute.MrLabel
334         size += 1 // m.MrRoute.MrEos
335         size += 1 // m.MrRoute.MrEosProto
336         size += 1 // m.MrRoute.MrIsMulticast
337         size += 1 // m.MrRoute.MrNPaths
338         for j2 := 0; j2 < len(m.MrRoute.MrPaths); j2++ {
339                 var s2 fib_types.FibPath
340                 _ = s2
341                 if j2 < len(m.MrRoute.MrPaths) {
342                         s2 = m.MrRoute.MrPaths[j2]
343                 }
344                 size += 4      // s2.SwIfIndex
345                 size += 4      // s2.TableID
346                 size += 4      // s2.RpfID
347                 size += 1      // s2.Weight
348                 size += 1      // s2.Preference
349                 size += 4      // s2.Type
350                 size += 4      // s2.Flags
351                 size += 4      // s2.Proto
352                 size += 1 * 16 // s2.Nh.Address
353                 size += 4      // s2.Nh.ViaLabel
354                 size += 4      // s2.Nh.ObjID
355                 size += 4      // s2.Nh.ClassifyTableIndex
356                 size += 1      // s2.NLabels
357                 for j3 := 0; j3 < 16; j3++ {
358                         size += 1 // s2.LabelStack[j3].IsUniform
359                         size += 4 // s2.LabelStack[j3].Label
360                         size += 1 // s2.LabelStack[j3].TTL
361                         size += 1 // s2.LabelStack[j3].Exp
362                 }
363         }
364         return size
365 }
366 func (m *MplsRouteDetails) Marshal(b []byte) ([]byte, error) {
367         if b == nil {
368                 b = make([]byte, m.Size())
369         }
370         buf := codec.NewBuffer(b)
371         buf.EncodeUint32(m.MrRoute.MrTableID)
372         buf.EncodeUint32(m.MrRoute.MrLabel)
373         buf.EncodeUint8(m.MrRoute.MrEos)
374         buf.EncodeUint8(m.MrRoute.MrEosProto)
375         buf.EncodeBool(m.MrRoute.MrIsMulticast)
376         buf.EncodeUint8(uint8(len(m.MrRoute.MrPaths)))
377         for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
378                 var v1 fib_types.FibPath // MrPaths
379                 if j1 < len(m.MrRoute.MrPaths) {
380                         v1 = m.MrRoute.MrPaths[j1]
381                 }
382                 buf.EncodeUint32(v1.SwIfIndex)
383                 buf.EncodeUint32(v1.TableID)
384                 buf.EncodeUint32(v1.RpfID)
385                 buf.EncodeUint8(v1.Weight)
386                 buf.EncodeUint8(v1.Preference)
387                 buf.EncodeUint32(uint32(v1.Type))
388                 buf.EncodeUint32(uint32(v1.Flags))
389                 buf.EncodeUint32(uint32(v1.Proto))
390                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
391                 buf.EncodeUint32(v1.Nh.ViaLabel)
392                 buf.EncodeUint32(v1.Nh.ObjID)
393                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
394                 buf.EncodeUint8(v1.NLabels)
395                 for j2 := 0; j2 < 16; j2++ {
396                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
397                         buf.EncodeUint32(v1.LabelStack[j2].Label)
398                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
399                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
400                 }
401         }
402         return buf.Bytes(), nil
403 }
404 func (m *MplsRouteDetails) Unmarshal(b []byte) error {
405         buf := codec.NewBuffer(b)
406         m.MrRoute.MrTableID = buf.DecodeUint32()
407         m.MrRoute.MrLabel = buf.DecodeUint32()
408         m.MrRoute.MrEos = buf.DecodeUint8()
409         m.MrRoute.MrEosProto = buf.DecodeUint8()
410         m.MrRoute.MrIsMulticast = buf.DecodeBool()
411         m.MrRoute.MrNPaths = buf.DecodeUint8()
412         m.MrRoute.MrPaths = make([]fib_types.FibPath, m.MrRoute.MrNPaths)
413         for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
414                 m.MrRoute.MrPaths[j1].SwIfIndex = buf.DecodeUint32()
415                 m.MrRoute.MrPaths[j1].TableID = buf.DecodeUint32()
416                 m.MrRoute.MrPaths[j1].RpfID = buf.DecodeUint32()
417                 m.MrRoute.MrPaths[j1].Weight = buf.DecodeUint8()
418                 m.MrRoute.MrPaths[j1].Preference = buf.DecodeUint8()
419                 m.MrRoute.MrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
420                 m.MrRoute.MrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
421                 m.MrRoute.MrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
422                 copy(m.MrRoute.MrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
423                 m.MrRoute.MrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
424                 m.MrRoute.MrPaths[j1].Nh.ObjID = buf.DecodeUint32()
425                 m.MrRoute.MrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
426                 m.MrRoute.MrPaths[j1].NLabels = buf.DecodeUint8()
427                 for j2 := 0; j2 < 16; j2++ {
428                         m.MrRoute.MrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
429                         m.MrRoute.MrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
430                         m.MrRoute.MrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
431                         m.MrRoute.MrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
432                 }
433         }
434         return nil
435 }
436
437 // MplsRouteDump defines message 'mpls_route_dump'.
438 type MplsRouteDump struct {
439         Table MplsTable `binapi:"mpls_table,name=table" json:"table,omitempty"`
440 }
441
442 func (m *MplsRouteDump) Reset()               { *m = MplsRouteDump{} }
443 func (*MplsRouteDump) GetMessageName() string { return "mpls_route_dump" }
444 func (*MplsRouteDump) GetCrcString() string   { return "935fdefa" }
445 func (*MplsRouteDump) GetMessageType() api.MessageType {
446         return api.RequestMessage
447 }
448
449 func (m *MplsRouteDump) Size() (size int) {
450         if m == nil {
451                 return 0
452         }
453         size += 4  // m.Table.MtTableID
454         size += 64 // m.Table.MtName
455         return size
456 }
457 func (m *MplsRouteDump) Marshal(b []byte) ([]byte, error) {
458         if b == nil {
459                 b = make([]byte, m.Size())
460         }
461         buf := codec.NewBuffer(b)
462         buf.EncodeUint32(m.Table.MtTableID)
463         buf.EncodeString(m.Table.MtName, 64)
464         return buf.Bytes(), nil
465 }
466 func (m *MplsRouteDump) Unmarshal(b []byte) error {
467         buf := codec.NewBuffer(b)
468         m.Table.MtTableID = buf.DecodeUint32()
469         m.Table.MtName = buf.DecodeString(64)
470         return nil
471 }
472
473 // MplsTableAddDel defines message 'mpls_table_add_del'.
474 type MplsTableAddDel struct {
475         MtIsAdd bool      `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"`
476         MtTable MplsTable `binapi:"mpls_table,name=mt_table" json:"mt_table,omitempty"`
477 }
478
479 func (m *MplsTableAddDel) Reset()               { *m = MplsTableAddDel{} }
480 func (*MplsTableAddDel) GetMessageName() string { return "mpls_table_add_del" }
481 func (*MplsTableAddDel) GetCrcString() string   { return "57817512" }
482 func (*MplsTableAddDel) GetMessageType() api.MessageType {
483         return api.RequestMessage
484 }
485
486 func (m *MplsTableAddDel) Size() (size int) {
487         if m == nil {
488                 return 0
489         }
490         size += 1  // m.MtIsAdd
491         size += 4  // m.MtTable.MtTableID
492         size += 64 // m.MtTable.MtName
493         return size
494 }
495 func (m *MplsTableAddDel) Marshal(b []byte) ([]byte, error) {
496         if b == nil {
497                 b = make([]byte, m.Size())
498         }
499         buf := codec.NewBuffer(b)
500         buf.EncodeBool(m.MtIsAdd)
501         buf.EncodeUint32(m.MtTable.MtTableID)
502         buf.EncodeString(m.MtTable.MtName, 64)
503         return buf.Bytes(), nil
504 }
505 func (m *MplsTableAddDel) Unmarshal(b []byte) error {
506         buf := codec.NewBuffer(b)
507         m.MtIsAdd = buf.DecodeBool()
508         m.MtTable.MtTableID = buf.DecodeUint32()
509         m.MtTable.MtName = buf.DecodeString(64)
510         return nil
511 }
512
513 // MplsTableAddDelReply defines message 'mpls_table_add_del_reply'.
514 type MplsTableAddDelReply struct {
515         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
516 }
517
518 func (m *MplsTableAddDelReply) Reset()               { *m = MplsTableAddDelReply{} }
519 func (*MplsTableAddDelReply) GetMessageName() string { return "mpls_table_add_del_reply" }
520 func (*MplsTableAddDelReply) GetCrcString() string   { return "e8d4e804" }
521 func (*MplsTableAddDelReply) GetMessageType() api.MessageType {
522         return api.ReplyMessage
523 }
524
525 func (m *MplsTableAddDelReply) Size() (size int) {
526         if m == nil {
527                 return 0
528         }
529         size += 4 // m.Retval
530         return size
531 }
532 func (m *MplsTableAddDelReply) Marshal(b []byte) ([]byte, error) {
533         if b == nil {
534                 b = make([]byte, m.Size())
535         }
536         buf := codec.NewBuffer(b)
537         buf.EncodeInt32(m.Retval)
538         return buf.Bytes(), nil
539 }
540 func (m *MplsTableAddDelReply) Unmarshal(b []byte) error {
541         buf := codec.NewBuffer(b)
542         m.Retval = buf.DecodeInt32()
543         return nil
544 }
545
546 // MplsTableDetails defines message 'mpls_table_details'.
547 type MplsTableDetails struct {
548         MtTable MplsTable `binapi:"mpls_table,name=mt_table" json:"mt_table,omitempty"`
549 }
550
551 func (m *MplsTableDetails) Reset()               { *m = MplsTableDetails{} }
552 func (*MplsTableDetails) GetMessageName() string { return "mpls_table_details" }
553 func (*MplsTableDetails) GetCrcString() string   { return "f03ecdc8" }
554 func (*MplsTableDetails) GetMessageType() api.MessageType {
555         return api.ReplyMessage
556 }
557
558 func (m *MplsTableDetails) Size() (size int) {
559         if m == nil {
560                 return 0
561         }
562         size += 4  // m.MtTable.MtTableID
563         size += 64 // m.MtTable.MtName
564         return size
565 }
566 func (m *MplsTableDetails) Marshal(b []byte) ([]byte, error) {
567         if b == nil {
568                 b = make([]byte, m.Size())
569         }
570         buf := codec.NewBuffer(b)
571         buf.EncodeUint32(m.MtTable.MtTableID)
572         buf.EncodeString(m.MtTable.MtName, 64)
573         return buf.Bytes(), nil
574 }
575 func (m *MplsTableDetails) Unmarshal(b []byte) error {
576         buf := codec.NewBuffer(b)
577         m.MtTable.MtTableID = buf.DecodeUint32()
578         m.MtTable.MtName = buf.DecodeString(64)
579         return nil
580 }
581
582 // MplsTableDump defines message 'mpls_table_dump'.
583 type MplsTableDump struct{}
584
585 func (m *MplsTableDump) Reset()               { *m = MplsTableDump{} }
586 func (*MplsTableDump) GetMessageName() string { return "mpls_table_dump" }
587 func (*MplsTableDump) GetCrcString() string   { return "51077d14" }
588 func (*MplsTableDump) GetMessageType() api.MessageType {
589         return api.RequestMessage
590 }
591
592 func (m *MplsTableDump) Size() (size int) {
593         if m == nil {
594                 return 0
595         }
596         return size
597 }
598 func (m *MplsTableDump) Marshal(b []byte) ([]byte, error) {
599         if b == nil {
600                 b = make([]byte, m.Size())
601         }
602         buf := codec.NewBuffer(b)
603         return buf.Bytes(), nil
604 }
605 func (m *MplsTableDump) Unmarshal(b []byte) error {
606         return nil
607 }
608
609 // MplsTunnelAddDel defines message 'mpls_tunnel_add_del'.
610 type MplsTunnelAddDel struct {
611         MtIsAdd  bool       `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"`
612         MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"`
613 }
614
615 func (m *MplsTunnelAddDel) Reset()               { *m = MplsTunnelAddDel{} }
616 func (*MplsTunnelAddDel) GetMessageName() string { return "mpls_tunnel_add_del" }
617 func (*MplsTunnelAddDel) GetCrcString() string   { return "e57ce61d" }
618 func (*MplsTunnelAddDel) GetMessageType() api.MessageType {
619         return api.RequestMessage
620 }
621
622 func (m *MplsTunnelAddDel) Size() (size int) {
623         if m == nil {
624                 return 0
625         }
626         size += 1  // m.MtIsAdd
627         size += 4  // m.MtTunnel.MtSwIfIndex
628         size += 4  // m.MtTunnel.MtTunnelIndex
629         size += 1  // m.MtTunnel.MtL2Only
630         size += 1  // m.MtTunnel.MtIsMulticast
631         size += 64 // m.MtTunnel.MtTag
632         size += 1  // m.MtTunnel.MtNPaths
633         for j2 := 0; j2 < len(m.MtTunnel.MtPaths); j2++ {
634                 var s2 fib_types.FibPath
635                 _ = s2
636                 if j2 < len(m.MtTunnel.MtPaths) {
637                         s2 = m.MtTunnel.MtPaths[j2]
638                 }
639                 size += 4      // s2.SwIfIndex
640                 size += 4      // s2.TableID
641                 size += 4      // s2.RpfID
642                 size += 1      // s2.Weight
643                 size += 1      // s2.Preference
644                 size += 4      // s2.Type
645                 size += 4      // s2.Flags
646                 size += 4      // s2.Proto
647                 size += 1 * 16 // s2.Nh.Address
648                 size += 4      // s2.Nh.ViaLabel
649                 size += 4      // s2.Nh.ObjID
650                 size += 4      // s2.Nh.ClassifyTableIndex
651                 size += 1      // s2.NLabels
652                 for j3 := 0; j3 < 16; j3++ {
653                         size += 1 // s2.LabelStack[j3].IsUniform
654                         size += 4 // s2.LabelStack[j3].Label
655                         size += 1 // s2.LabelStack[j3].TTL
656                         size += 1 // s2.LabelStack[j3].Exp
657                 }
658         }
659         return size
660 }
661 func (m *MplsTunnelAddDel) Marshal(b []byte) ([]byte, error) {
662         if b == nil {
663                 b = make([]byte, m.Size())
664         }
665         buf := codec.NewBuffer(b)
666         buf.EncodeBool(m.MtIsAdd)
667         buf.EncodeUint32(uint32(m.MtTunnel.MtSwIfIndex))
668         buf.EncodeUint32(m.MtTunnel.MtTunnelIndex)
669         buf.EncodeBool(m.MtTunnel.MtL2Only)
670         buf.EncodeBool(m.MtTunnel.MtIsMulticast)
671         buf.EncodeString(m.MtTunnel.MtTag, 64)
672         buf.EncodeUint8(uint8(len(m.MtTunnel.MtPaths)))
673         for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
674                 var v1 fib_types.FibPath // MtPaths
675                 if j1 < len(m.MtTunnel.MtPaths) {
676                         v1 = m.MtTunnel.MtPaths[j1]
677                 }
678                 buf.EncodeUint32(v1.SwIfIndex)
679                 buf.EncodeUint32(v1.TableID)
680                 buf.EncodeUint32(v1.RpfID)
681                 buf.EncodeUint8(v1.Weight)
682                 buf.EncodeUint8(v1.Preference)
683                 buf.EncodeUint32(uint32(v1.Type))
684                 buf.EncodeUint32(uint32(v1.Flags))
685                 buf.EncodeUint32(uint32(v1.Proto))
686                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
687                 buf.EncodeUint32(v1.Nh.ViaLabel)
688                 buf.EncodeUint32(v1.Nh.ObjID)
689                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
690                 buf.EncodeUint8(v1.NLabels)
691                 for j2 := 0; j2 < 16; j2++ {
692                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
693                         buf.EncodeUint32(v1.LabelStack[j2].Label)
694                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
695                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
696                 }
697         }
698         return buf.Bytes(), nil
699 }
700 func (m *MplsTunnelAddDel) Unmarshal(b []byte) error {
701         buf := codec.NewBuffer(b)
702         m.MtIsAdd = buf.DecodeBool()
703         m.MtTunnel.MtSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
704         m.MtTunnel.MtTunnelIndex = buf.DecodeUint32()
705         m.MtTunnel.MtL2Only = buf.DecodeBool()
706         m.MtTunnel.MtIsMulticast = buf.DecodeBool()
707         m.MtTunnel.MtTag = buf.DecodeString(64)
708         m.MtTunnel.MtNPaths = buf.DecodeUint8()
709         m.MtTunnel.MtPaths = make([]fib_types.FibPath, m.MtTunnel.MtNPaths)
710         for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
711                 m.MtTunnel.MtPaths[j1].SwIfIndex = buf.DecodeUint32()
712                 m.MtTunnel.MtPaths[j1].TableID = buf.DecodeUint32()
713                 m.MtTunnel.MtPaths[j1].RpfID = buf.DecodeUint32()
714                 m.MtTunnel.MtPaths[j1].Weight = buf.DecodeUint8()
715                 m.MtTunnel.MtPaths[j1].Preference = buf.DecodeUint8()
716                 m.MtTunnel.MtPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
717                 m.MtTunnel.MtPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
718                 m.MtTunnel.MtPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
719                 copy(m.MtTunnel.MtPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
720                 m.MtTunnel.MtPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
721                 m.MtTunnel.MtPaths[j1].Nh.ObjID = buf.DecodeUint32()
722                 m.MtTunnel.MtPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
723                 m.MtTunnel.MtPaths[j1].NLabels = buf.DecodeUint8()
724                 for j2 := 0; j2 < 16; j2++ {
725                         m.MtTunnel.MtPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
726                         m.MtTunnel.MtPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
727                         m.MtTunnel.MtPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
728                         m.MtTunnel.MtPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
729                 }
730         }
731         return nil
732 }
733
734 // MplsTunnelAddDelReply defines message 'mpls_tunnel_add_del_reply'.
735 type MplsTunnelAddDelReply struct {
736         Retval      int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
737         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
738         TunnelIndex uint32                         `binapi:"u32,name=tunnel_index" json:"tunnel_index,omitempty"`
739 }
740
741 func (m *MplsTunnelAddDelReply) Reset()               { *m = MplsTunnelAddDelReply{} }
742 func (*MplsTunnelAddDelReply) GetMessageName() string { return "mpls_tunnel_add_del_reply" }
743 func (*MplsTunnelAddDelReply) GetCrcString() string   { return "afb01472" }
744 func (*MplsTunnelAddDelReply) GetMessageType() api.MessageType {
745         return api.ReplyMessage
746 }
747
748 func (m *MplsTunnelAddDelReply) Size() (size int) {
749         if m == nil {
750                 return 0
751         }
752         size += 4 // m.Retval
753         size += 4 // m.SwIfIndex
754         size += 4 // m.TunnelIndex
755         return size
756 }
757 func (m *MplsTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
758         if b == nil {
759                 b = make([]byte, m.Size())
760         }
761         buf := codec.NewBuffer(b)
762         buf.EncodeInt32(m.Retval)
763         buf.EncodeUint32(uint32(m.SwIfIndex))
764         buf.EncodeUint32(m.TunnelIndex)
765         return buf.Bytes(), nil
766 }
767 func (m *MplsTunnelAddDelReply) Unmarshal(b []byte) error {
768         buf := codec.NewBuffer(b)
769         m.Retval = buf.DecodeInt32()
770         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
771         m.TunnelIndex = buf.DecodeUint32()
772         return nil
773 }
774
775 // MplsTunnelDetails defines message 'mpls_tunnel_details'.
776 type MplsTunnelDetails struct {
777         MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"`
778 }
779
780 func (m *MplsTunnelDetails) Reset()               { *m = MplsTunnelDetails{} }
781 func (*MplsTunnelDetails) GetMessageName() string { return "mpls_tunnel_details" }
782 func (*MplsTunnelDetails) GetCrcString() string   { return "f3c0928e" }
783 func (*MplsTunnelDetails) GetMessageType() api.MessageType {
784         return api.ReplyMessage
785 }
786
787 func (m *MplsTunnelDetails) Size() (size int) {
788         if m == nil {
789                 return 0
790         }
791         size += 4  // m.MtTunnel.MtSwIfIndex
792         size += 4  // m.MtTunnel.MtTunnelIndex
793         size += 1  // m.MtTunnel.MtL2Only
794         size += 1  // m.MtTunnel.MtIsMulticast
795         size += 64 // m.MtTunnel.MtTag
796         size += 1  // m.MtTunnel.MtNPaths
797         for j2 := 0; j2 < len(m.MtTunnel.MtPaths); j2++ {
798                 var s2 fib_types.FibPath
799                 _ = s2
800                 if j2 < len(m.MtTunnel.MtPaths) {
801                         s2 = m.MtTunnel.MtPaths[j2]
802                 }
803                 size += 4      // s2.SwIfIndex
804                 size += 4      // s2.TableID
805                 size += 4      // s2.RpfID
806                 size += 1      // s2.Weight
807                 size += 1      // s2.Preference
808                 size += 4      // s2.Type
809                 size += 4      // s2.Flags
810                 size += 4      // s2.Proto
811                 size += 1 * 16 // s2.Nh.Address
812                 size += 4      // s2.Nh.ViaLabel
813                 size += 4      // s2.Nh.ObjID
814                 size += 4      // s2.Nh.ClassifyTableIndex
815                 size += 1      // s2.NLabels
816                 for j3 := 0; j3 < 16; j3++ {
817                         size += 1 // s2.LabelStack[j3].IsUniform
818                         size += 4 // s2.LabelStack[j3].Label
819                         size += 1 // s2.LabelStack[j3].TTL
820                         size += 1 // s2.LabelStack[j3].Exp
821                 }
822         }
823         return size
824 }
825 func (m *MplsTunnelDetails) Marshal(b []byte) ([]byte, error) {
826         if b == nil {
827                 b = make([]byte, m.Size())
828         }
829         buf := codec.NewBuffer(b)
830         buf.EncodeUint32(uint32(m.MtTunnel.MtSwIfIndex))
831         buf.EncodeUint32(m.MtTunnel.MtTunnelIndex)
832         buf.EncodeBool(m.MtTunnel.MtL2Only)
833         buf.EncodeBool(m.MtTunnel.MtIsMulticast)
834         buf.EncodeString(m.MtTunnel.MtTag, 64)
835         buf.EncodeUint8(uint8(len(m.MtTunnel.MtPaths)))
836         for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
837                 var v1 fib_types.FibPath // MtPaths
838                 if j1 < len(m.MtTunnel.MtPaths) {
839                         v1 = m.MtTunnel.MtPaths[j1]
840                 }
841                 buf.EncodeUint32(v1.SwIfIndex)
842                 buf.EncodeUint32(v1.TableID)
843                 buf.EncodeUint32(v1.RpfID)
844                 buf.EncodeUint8(v1.Weight)
845                 buf.EncodeUint8(v1.Preference)
846                 buf.EncodeUint32(uint32(v1.Type))
847                 buf.EncodeUint32(uint32(v1.Flags))
848                 buf.EncodeUint32(uint32(v1.Proto))
849                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
850                 buf.EncodeUint32(v1.Nh.ViaLabel)
851                 buf.EncodeUint32(v1.Nh.ObjID)
852                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
853                 buf.EncodeUint8(v1.NLabels)
854                 for j2 := 0; j2 < 16; j2++ {
855                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
856                         buf.EncodeUint32(v1.LabelStack[j2].Label)
857                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
858                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
859                 }
860         }
861         return buf.Bytes(), nil
862 }
863 func (m *MplsTunnelDetails) Unmarshal(b []byte) error {
864         buf := codec.NewBuffer(b)
865         m.MtTunnel.MtSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
866         m.MtTunnel.MtTunnelIndex = buf.DecodeUint32()
867         m.MtTunnel.MtL2Only = buf.DecodeBool()
868         m.MtTunnel.MtIsMulticast = buf.DecodeBool()
869         m.MtTunnel.MtTag = buf.DecodeString(64)
870         m.MtTunnel.MtNPaths = buf.DecodeUint8()
871         m.MtTunnel.MtPaths = make([]fib_types.FibPath, m.MtTunnel.MtNPaths)
872         for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
873                 m.MtTunnel.MtPaths[j1].SwIfIndex = buf.DecodeUint32()
874                 m.MtTunnel.MtPaths[j1].TableID = buf.DecodeUint32()
875                 m.MtTunnel.MtPaths[j1].RpfID = buf.DecodeUint32()
876                 m.MtTunnel.MtPaths[j1].Weight = buf.DecodeUint8()
877                 m.MtTunnel.MtPaths[j1].Preference = buf.DecodeUint8()
878                 m.MtTunnel.MtPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
879                 m.MtTunnel.MtPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
880                 m.MtTunnel.MtPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
881                 copy(m.MtTunnel.MtPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
882                 m.MtTunnel.MtPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
883                 m.MtTunnel.MtPaths[j1].Nh.ObjID = buf.DecodeUint32()
884                 m.MtTunnel.MtPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
885                 m.MtTunnel.MtPaths[j1].NLabels = buf.DecodeUint8()
886                 for j2 := 0; j2 < 16; j2++ {
887                         m.MtTunnel.MtPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
888                         m.MtTunnel.MtPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
889                         m.MtTunnel.MtPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
890                         m.MtTunnel.MtPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
891                 }
892         }
893         return nil
894 }
895
896 // MplsTunnelDump defines message 'mpls_tunnel_dump'.
897 type MplsTunnelDump struct {
898         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
899 }
900
901 func (m *MplsTunnelDump) Reset()               { *m = MplsTunnelDump{} }
902 func (*MplsTunnelDump) GetMessageName() string { return "mpls_tunnel_dump" }
903 func (*MplsTunnelDump) GetCrcString() string   { return "f9e6675e" }
904 func (*MplsTunnelDump) GetMessageType() api.MessageType {
905         return api.RequestMessage
906 }
907
908 func (m *MplsTunnelDump) Size() (size int) {
909         if m == nil {
910                 return 0
911         }
912         size += 4 // m.SwIfIndex
913         return size
914 }
915 func (m *MplsTunnelDump) Marshal(b []byte) ([]byte, error) {
916         if b == nil {
917                 b = make([]byte, m.Size())
918         }
919         buf := codec.NewBuffer(b)
920         buf.EncodeUint32(uint32(m.SwIfIndex))
921         return buf.Bytes(), nil
922 }
923 func (m *MplsTunnelDump) Unmarshal(b []byte) error {
924         buf := codec.NewBuffer(b)
925         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
926         return nil
927 }
928
929 // SwInterfaceSetMplsEnable defines message 'sw_interface_set_mpls_enable'.
930 type SwInterfaceSetMplsEnable struct {
931         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
932         Enable    bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
933 }
934
935 func (m *SwInterfaceSetMplsEnable) Reset()               { *m = SwInterfaceSetMplsEnable{} }
936 func (*SwInterfaceSetMplsEnable) GetMessageName() string { return "sw_interface_set_mpls_enable" }
937 func (*SwInterfaceSetMplsEnable) GetCrcString() string   { return "ae6cfcfb" }
938 func (*SwInterfaceSetMplsEnable) GetMessageType() api.MessageType {
939         return api.RequestMessage
940 }
941
942 func (m *SwInterfaceSetMplsEnable) Size() (size int) {
943         if m == nil {
944                 return 0
945         }
946         size += 4 // m.SwIfIndex
947         size += 1 // m.Enable
948         return size
949 }
950 func (m *SwInterfaceSetMplsEnable) Marshal(b []byte) ([]byte, error) {
951         if b == nil {
952                 b = make([]byte, m.Size())
953         }
954         buf := codec.NewBuffer(b)
955         buf.EncodeUint32(uint32(m.SwIfIndex))
956         buf.EncodeBool(m.Enable)
957         return buf.Bytes(), nil
958 }
959 func (m *SwInterfaceSetMplsEnable) Unmarshal(b []byte) error {
960         buf := codec.NewBuffer(b)
961         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
962         m.Enable = buf.DecodeBool()
963         return nil
964 }
965
966 // SwInterfaceSetMplsEnableReply defines message 'sw_interface_set_mpls_enable_reply'.
967 type SwInterfaceSetMplsEnableReply struct {
968         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
969 }
970
971 func (m *SwInterfaceSetMplsEnableReply) Reset() { *m = SwInterfaceSetMplsEnableReply{} }
972 func (*SwInterfaceSetMplsEnableReply) GetMessageName() string {
973         return "sw_interface_set_mpls_enable_reply"
974 }
975 func (*SwInterfaceSetMplsEnableReply) GetCrcString() string { return "e8d4e804" }
976 func (*SwInterfaceSetMplsEnableReply) GetMessageType() api.MessageType {
977         return api.ReplyMessage
978 }
979
980 func (m *SwInterfaceSetMplsEnableReply) Size() (size int) {
981         if m == nil {
982                 return 0
983         }
984         size += 4 // m.Retval
985         return size
986 }
987 func (m *SwInterfaceSetMplsEnableReply) Marshal(b []byte) ([]byte, error) {
988         if b == nil {
989                 b = make([]byte, m.Size())
990         }
991         buf := codec.NewBuffer(b)
992         buf.EncodeInt32(m.Retval)
993         return buf.Bytes(), nil
994 }
995 func (m *SwInterfaceSetMplsEnableReply) Unmarshal(b []byte) error {
996         buf := codec.NewBuffer(b)
997         m.Retval = buf.DecodeInt32()
998         return nil
999 }
1000
1001 func init() { file_mpls_binapi_init() }
1002 func file_mpls_binapi_init() {
1003         api.RegisterMessage((*MplsIPBindUnbind)(nil), "mpls_ip_bind_unbind_48249a27")
1004         api.RegisterMessage((*MplsIPBindUnbindReply)(nil), "mpls_ip_bind_unbind_reply_e8d4e804")
1005         api.RegisterMessage((*MplsRouteAddDel)(nil), "mpls_route_add_del_343cff54")
1006         api.RegisterMessage((*MplsRouteAddDelReply)(nil), "mpls_route_add_del_reply_1992deab")
1007         api.RegisterMessage((*MplsRouteDetails)(nil), "mpls_route_details_d0ac384c")
1008         api.RegisterMessage((*MplsRouteDump)(nil), "mpls_route_dump_935fdefa")
1009         api.RegisterMessage((*MplsTableAddDel)(nil), "mpls_table_add_del_57817512")
1010         api.RegisterMessage((*MplsTableAddDelReply)(nil), "mpls_table_add_del_reply_e8d4e804")
1011         api.RegisterMessage((*MplsTableDetails)(nil), "mpls_table_details_f03ecdc8")
1012         api.RegisterMessage((*MplsTableDump)(nil), "mpls_table_dump_51077d14")
1013         api.RegisterMessage((*MplsTunnelAddDel)(nil), "mpls_tunnel_add_del_e57ce61d")
1014         api.RegisterMessage((*MplsTunnelAddDelReply)(nil), "mpls_tunnel_add_del_reply_afb01472")
1015         api.RegisterMessage((*MplsTunnelDetails)(nil), "mpls_tunnel_details_f3c0928e")
1016         api.RegisterMessage((*MplsTunnelDump)(nil), "mpls_tunnel_dump_f9e6675e")
1017         api.RegisterMessage((*SwInterfaceSetMplsEnable)(nil), "sw_interface_set_mpls_enable_ae6cfcfb")
1018         api.RegisterMessage((*SwInterfaceSetMplsEnableReply)(nil), "sw_interface_set_mpls_enable_reply_e8d4e804")
1019 }
1020
1021 // Messages returns list of all messages in this module.
1022 func AllMessages() []api.Message {
1023         return []api.Message{
1024                 (*MplsIPBindUnbind)(nil),
1025                 (*MplsIPBindUnbindReply)(nil),
1026                 (*MplsRouteAddDel)(nil),
1027                 (*MplsRouteAddDelReply)(nil),
1028                 (*MplsRouteDetails)(nil),
1029                 (*MplsRouteDump)(nil),
1030                 (*MplsTableAddDel)(nil),
1031                 (*MplsTableAddDelReply)(nil),
1032                 (*MplsTableDetails)(nil),
1033                 (*MplsTableDump)(nil),
1034                 (*MplsTunnelAddDel)(nil),
1035                 (*MplsTunnelAddDelReply)(nil),
1036                 (*MplsTunnelDetails)(nil),
1037                 (*MplsTunnelDump)(nil),
1038                 (*SwInterfaceSetMplsEnable)(nil),
1039                 (*SwInterfaceSetMplsEnableReply)(nil),
1040         }
1041 }