1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/mpls.api.json
7 // Package mpls contains generated bindings for API file mpls.api.
16 api "git.fd.io/govpp.git/api"
17 fib_types "git.fd.io/govpp.git/binapi/fib_types"
18 interface_types "git.fd.io/govpp.git/binapi/interface_types"
19 ip_types "git.fd.io/govpp.git/binapi/ip_types"
20 codec "git.fd.io/govpp.git/codec"
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
32 VersionCrc = 0xd83a030f
35 // MplsRoute defines type 'mpls_route'.
36 type MplsRoute struct {
37 MrTableID uint32 `binapi:"u32,name=mr_table_id" json:"mr_table_id,omitempty"`
38 MrLabel uint32 `binapi:"u32,name=mr_label" json:"mr_label,omitempty"`
39 MrEos uint8 `binapi:"u8,name=mr_eos" json:"mr_eos,omitempty"`
40 MrEosProto uint8 `binapi:"u8,name=mr_eos_proto" json:"mr_eos_proto,omitempty"`
41 MrIsMulticast bool `binapi:"bool,name=mr_is_multicast" json:"mr_is_multicast,omitempty"`
42 MrNPaths uint8 `binapi:"u8,name=mr_n_paths" json:"-"`
43 MrPaths []fib_types.FibPath `binapi:"fib_path[mr_n_paths],name=mr_paths" json:"mr_paths,omitempty"`
46 // MplsTable defines type 'mpls_table'.
47 type MplsTable struct {
48 MtTableID uint32 `binapi:"u32,name=mt_table_id" json:"mt_table_id,omitempty"`
49 MtName string `binapi:"string[64],name=mt_name" json:"mt_name,omitempty"`
52 // MplsTunnel defines type 'mpls_tunnel'.
53 type MplsTunnel struct {
54 MtSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mt_sw_if_index" json:"mt_sw_if_index,omitempty"`
55 MtTunnelIndex uint32 `binapi:"u32,name=mt_tunnel_index" json:"mt_tunnel_index,omitempty"`
56 MtL2Only bool `binapi:"bool,name=mt_l2_only" json:"mt_l2_only,omitempty"`
57 MtIsMulticast bool `binapi:"bool,name=mt_is_multicast" json:"mt_is_multicast,omitempty"`
58 MtTag string `binapi:"string[64],name=mt_tag" json:"mt_tag,omitempty"`
59 MtNPaths uint8 `binapi:"u8,name=mt_n_paths" json:"-"`
60 MtPaths []fib_types.FibPath `binapi:"fib_path[mt_n_paths],name=mt_paths" json:"mt_paths,omitempty"`
63 // MplsIPBindUnbind defines message 'mpls_ip_bind_unbind'.
64 type MplsIPBindUnbind struct {
65 MbMplsTableID uint32 `binapi:"u32,name=mb_mpls_table_id" json:"mb_mpls_table_id,omitempty"`
66 MbLabel uint32 `binapi:"u32,name=mb_label" json:"mb_label,omitempty"`
67 MbIPTableID uint32 `binapi:"u32,name=mb_ip_table_id" json:"mb_ip_table_id,omitempty"`
68 MbIsBind bool `binapi:"bool,name=mb_is_bind" json:"mb_is_bind,omitempty"`
69 MbPrefix ip_types.Prefix `binapi:"prefix,name=mb_prefix" json:"mb_prefix,omitempty"`
72 func (m *MplsIPBindUnbind) Reset() { *m = MplsIPBindUnbind{} }
73 func (*MplsIPBindUnbind) GetMessageName() string { return "mpls_ip_bind_unbind" }
74 func (*MplsIPBindUnbind) GetCrcString() string { return "48249a27" }
75 func (*MplsIPBindUnbind) GetMessageType() api.MessageType {
76 return api.RequestMessage
79 func (m *MplsIPBindUnbind) Size() int {
84 size += 4 // m.MbMplsTableID
85 size += 4 // m.MbLabel
86 size += 4 // m.MbIPTableID
87 size += 1 // m.MbIsBind
88 size += 1 // m.MbPrefix.Address.Af
89 size += 1 * 16 // m.MbPrefix.Address.Un
90 size += 1 // m.MbPrefix.Len
93 func (m *MplsIPBindUnbind) Marshal(b []byte) ([]byte, error) {
96 buf = codec.NewBuffer(make([]byte, m.Size()))
98 buf = codec.NewBuffer(b)
100 buf.EncodeUint32(uint32(m.MbMplsTableID))
101 buf.EncodeUint32(uint32(m.MbLabel))
102 buf.EncodeUint32(uint32(m.MbIPTableID))
103 buf.EncodeBool(m.MbIsBind)
104 buf.EncodeUint8(uint8(m.MbPrefix.Address.Af))
105 buf.EncodeBytes(m.MbPrefix.Address.Un.XXX_UnionData[:], 0)
106 buf.EncodeUint8(uint8(m.MbPrefix.Len))
107 return buf.Bytes(), nil
109 func (m *MplsIPBindUnbind) Unmarshal(b []byte) error {
110 buf := codec.NewBuffer(b)
111 m.MbMplsTableID = buf.DecodeUint32()
112 m.MbLabel = buf.DecodeUint32()
113 m.MbIPTableID = buf.DecodeUint32()
114 m.MbIsBind = buf.DecodeBool()
115 m.MbPrefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
116 copy(m.MbPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
117 m.MbPrefix.Len = buf.DecodeUint8()
121 // MplsIPBindUnbindReply defines message 'mpls_ip_bind_unbind_reply'.
122 type MplsIPBindUnbindReply struct {
123 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
126 func (m *MplsIPBindUnbindReply) Reset() { *m = MplsIPBindUnbindReply{} }
127 func (*MplsIPBindUnbindReply) GetMessageName() string { return "mpls_ip_bind_unbind_reply" }
128 func (*MplsIPBindUnbindReply) GetCrcString() string { return "e8d4e804" }
129 func (*MplsIPBindUnbindReply) GetMessageType() api.MessageType {
130 return api.ReplyMessage
133 func (m *MplsIPBindUnbindReply) Size() int {
138 size += 4 // m.Retval
141 func (m *MplsIPBindUnbindReply) Marshal(b []byte) ([]byte, error) {
142 var buf *codec.Buffer
144 buf = codec.NewBuffer(make([]byte, m.Size()))
146 buf = codec.NewBuffer(b)
148 buf.EncodeUint32(uint32(m.Retval))
149 return buf.Bytes(), nil
151 func (m *MplsIPBindUnbindReply) Unmarshal(b []byte) error {
152 buf := codec.NewBuffer(b)
153 m.Retval = int32(buf.DecodeUint32())
157 // MplsRouteAddDel defines message 'mpls_route_add_del'.
158 type MplsRouteAddDel struct {
159 MrIsAdd bool `binapi:"bool,name=mr_is_add" json:"mr_is_add,omitempty"`
160 MrIsMultipath bool `binapi:"bool,name=mr_is_multipath" json:"mr_is_multipath,omitempty"`
161 MrRoute MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"`
164 func (m *MplsRouteAddDel) Reset() { *m = MplsRouteAddDel{} }
165 func (*MplsRouteAddDel) GetMessageName() string { return "mpls_route_add_del" }
166 func (*MplsRouteAddDel) GetCrcString() string { return "343cff54" }
167 func (*MplsRouteAddDel) GetMessageType() api.MessageType {
168 return api.RequestMessage
171 func (m *MplsRouteAddDel) Size() int {
176 size += 1 // m.MrIsAdd
177 size += 1 // m.MrIsMultipath
178 size += 4 // m.MrRoute.MrTableID
179 size += 4 // m.MrRoute.MrLabel
180 size += 1 // m.MrRoute.MrEos
181 size += 1 // m.MrRoute.MrEosProto
182 size += 1 // m.MrRoute.MrIsMulticast
183 size += 1 // m.MrRoute.MrNPaths
184 for j2 := 0; j2 < len(m.MrRoute.MrPaths); j2++ {
185 var s2 fib_types.FibPath
187 if j2 < len(m.MrRoute.MrPaths) {
188 s2 = m.MrRoute.MrPaths[j2]
190 size += 4 // s2.SwIfIndex
191 size += 4 // s2.TableID
192 size += 4 // s2.RpfID
193 size += 1 // s2.Weight
194 size += 1 // s2.Preference
196 size += 4 // s2.Flags
197 size += 4 // s2.Proto
198 size += 1 * 16 // s2.Nh.Address
199 size += 4 // s2.Nh.ViaLabel
200 size += 4 // s2.Nh.ObjID
201 size += 4 // s2.Nh.ClassifyTableIndex
202 size += 1 // s2.NLabels
203 for j3 := 0; j3 < 16; j3++ {
204 var s3 fib_types.FibMplsLabel
206 if j3 < len(s2.LabelStack) {
207 s3 = s2.LabelStack[j3]
209 size += 1 // s3.IsUniform
210 size += 4 // s3.Label
217 func (m *MplsRouteAddDel) Marshal(b []byte) ([]byte, error) {
218 var buf *codec.Buffer
220 buf = codec.NewBuffer(make([]byte, m.Size()))
222 buf = codec.NewBuffer(b)
224 buf.EncodeBool(m.MrIsAdd)
225 buf.EncodeBool(m.MrIsMultipath)
226 buf.EncodeUint32(uint32(m.MrRoute.MrTableID))
227 buf.EncodeUint32(uint32(m.MrRoute.MrLabel))
228 buf.EncodeUint8(uint8(m.MrRoute.MrEos))
229 buf.EncodeUint8(uint8(m.MrRoute.MrEosProto))
230 buf.EncodeBool(m.MrRoute.MrIsMulticast)
231 buf.EncodeUint8(uint8(len(m.MrRoute.MrPaths)))
232 for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
233 var v1 fib_types.FibPath
234 if j1 < len(m.MrRoute.MrPaths) {
235 v1 = m.MrRoute.MrPaths[j1]
237 buf.EncodeUint32(uint32(v1.SwIfIndex))
238 buf.EncodeUint32(uint32(v1.TableID))
239 buf.EncodeUint32(uint32(v1.RpfID))
240 buf.EncodeUint8(uint8(v1.Weight))
241 buf.EncodeUint8(uint8(v1.Preference))
242 buf.EncodeUint32(uint32(v1.Type))
243 buf.EncodeUint32(uint32(v1.Flags))
244 buf.EncodeUint32(uint32(v1.Proto))
245 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
246 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
247 buf.EncodeUint32(uint32(v1.Nh.ObjID))
248 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
249 buf.EncodeUint8(uint8(v1.NLabels))
250 for j2 := 0; j2 < 16; j2++ {
251 var v2 fib_types.FibMplsLabel
252 if j2 < len(v1.LabelStack) {
253 v2 = v1.LabelStack[j2]
255 buf.EncodeUint8(uint8(v2.IsUniform))
256 buf.EncodeUint32(uint32(v2.Label))
257 buf.EncodeUint8(uint8(v2.TTL))
258 buf.EncodeUint8(uint8(v2.Exp))
261 return buf.Bytes(), nil
263 func (m *MplsRouteAddDel) Unmarshal(b []byte) error {
264 buf := codec.NewBuffer(b)
265 m.MrIsAdd = buf.DecodeBool()
266 m.MrIsMultipath = buf.DecodeBool()
267 m.MrRoute.MrTableID = buf.DecodeUint32()
268 m.MrRoute.MrLabel = buf.DecodeUint32()
269 m.MrRoute.MrEos = buf.DecodeUint8()
270 m.MrRoute.MrEosProto = buf.DecodeUint8()
271 m.MrRoute.MrIsMulticast = buf.DecodeBool()
272 m.MrRoute.MrNPaths = buf.DecodeUint8()
273 m.MrRoute.MrPaths = make([]fib_types.FibPath, int(m.MrRoute.MrNPaths))
274 for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
275 m.MrRoute.MrPaths[j1].SwIfIndex = buf.DecodeUint32()
276 m.MrRoute.MrPaths[j1].TableID = buf.DecodeUint32()
277 m.MrRoute.MrPaths[j1].RpfID = buf.DecodeUint32()
278 m.MrRoute.MrPaths[j1].Weight = buf.DecodeUint8()
279 m.MrRoute.MrPaths[j1].Preference = buf.DecodeUint8()
280 m.MrRoute.MrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
281 m.MrRoute.MrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
282 m.MrRoute.MrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
283 copy(m.MrRoute.MrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
284 m.MrRoute.MrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
285 m.MrRoute.MrPaths[j1].Nh.ObjID = buf.DecodeUint32()
286 m.MrRoute.MrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
287 m.MrRoute.MrPaths[j1].NLabels = buf.DecodeUint8()
288 for j2 := 0; j2 < 16; j2++ {
289 m.MrRoute.MrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
290 m.MrRoute.MrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
291 m.MrRoute.MrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
292 m.MrRoute.MrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
298 // MplsRouteAddDelReply defines message 'mpls_route_add_del_reply'.
299 type MplsRouteAddDelReply struct {
300 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
301 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
304 func (m *MplsRouteAddDelReply) Reset() { *m = MplsRouteAddDelReply{} }
305 func (*MplsRouteAddDelReply) GetMessageName() string { return "mpls_route_add_del_reply" }
306 func (*MplsRouteAddDelReply) GetCrcString() string { return "1992deab" }
307 func (*MplsRouteAddDelReply) GetMessageType() api.MessageType {
308 return api.ReplyMessage
311 func (m *MplsRouteAddDelReply) Size() int {
316 size += 4 // m.Retval
317 size += 4 // m.StatsIndex
320 func (m *MplsRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
321 var buf *codec.Buffer
323 buf = codec.NewBuffer(make([]byte, m.Size()))
325 buf = codec.NewBuffer(b)
327 buf.EncodeUint32(uint32(m.Retval))
328 buf.EncodeUint32(uint32(m.StatsIndex))
329 return buf.Bytes(), nil
331 func (m *MplsRouteAddDelReply) Unmarshal(b []byte) error {
332 buf := codec.NewBuffer(b)
333 m.Retval = int32(buf.DecodeUint32())
334 m.StatsIndex = buf.DecodeUint32()
338 // MplsRouteDetails defines message 'mpls_route_details'.
339 type MplsRouteDetails struct {
340 MrRoute MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"`
343 func (m *MplsRouteDetails) Reset() { *m = MplsRouteDetails{} }
344 func (*MplsRouteDetails) GetMessageName() string { return "mpls_route_details" }
345 func (*MplsRouteDetails) GetCrcString() string { return "d0ac384c" }
346 func (*MplsRouteDetails) GetMessageType() api.MessageType {
347 return api.ReplyMessage
350 func (m *MplsRouteDetails) Size() int {
355 size += 4 // m.MrRoute.MrTableID
356 size += 4 // m.MrRoute.MrLabel
357 size += 1 // m.MrRoute.MrEos
358 size += 1 // m.MrRoute.MrEosProto
359 size += 1 // m.MrRoute.MrIsMulticast
360 size += 1 // m.MrRoute.MrNPaths
361 for j2 := 0; j2 < len(m.MrRoute.MrPaths); j2++ {
362 var s2 fib_types.FibPath
364 if j2 < len(m.MrRoute.MrPaths) {
365 s2 = m.MrRoute.MrPaths[j2]
367 size += 4 // s2.SwIfIndex
368 size += 4 // s2.TableID
369 size += 4 // s2.RpfID
370 size += 1 // s2.Weight
371 size += 1 // s2.Preference
373 size += 4 // s2.Flags
374 size += 4 // s2.Proto
375 size += 1 * 16 // s2.Nh.Address
376 size += 4 // s2.Nh.ViaLabel
377 size += 4 // s2.Nh.ObjID
378 size += 4 // s2.Nh.ClassifyTableIndex
379 size += 1 // s2.NLabels
380 for j3 := 0; j3 < 16; j3++ {
381 var s3 fib_types.FibMplsLabel
383 if j3 < len(s2.LabelStack) {
384 s3 = s2.LabelStack[j3]
386 size += 1 // s3.IsUniform
387 size += 4 // s3.Label
394 func (m *MplsRouteDetails) Marshal(b []byte) ([]byte, error) {
395 var buf *codec.Buffer
397 buf = codec.NewBuffer(make([]byte, m.Size()))
399 buf = codec.NewBuffer(b)
401 buf.EncodeUint32(uint32(m.MrRoute.MrTableID))
402 buf.EncodeUint32(uint32(m.MrRoute.MrLabel))
403 buf.EncodeUint8(uint8(m.MrRoute.MrEos))
404 buf.EncodeUint8(uint8(m.MrRoute.MrEosProto))
405 buf.EncodeBool(m.MrRoute.MrIsMulticast)
406 buf.EncodeUint8(uint8(len(m.MrRoute.MrPaths)))
407 for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
408 var v1 fib_types.FibPath
409 if j1 < len(m.MrRoute.MrPaths) {
410 v1 = m.MrRoute.MrPaths[j1]
412 buf.EncodeUint32(uint32(v1.SwIfIndex))
413 buf.EncodeUint32(uint32(v1.TableID))
414 buf.EncodeUint32(uint32(v1.RpfID))
415 buf.EncodeUint8(uint8(v1.Weight))
416 buf.EncodeUint8(uint8(v1.Preference))
417 buf.EncodeUint32(uint32(v1.Type))
418 buf.EncodeUint32(uint32(v1.Flags))
419 buf.EncodeUint32(uint32(v1.Proto))
420 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
421 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
422 buf.EncodeUint32(uint32(v1.Nh.ObjID))
423 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
424 buf.EncodeUint8(uint8(v1.NLabels))
425 for j2 := 0; j2 < 16; j2++ {
426 var v2 fib_types.FibMplsLabel
427 if j2 < len(v1.LabelStack) {
428 v2 = v1.LabelStack[j2]
430 buf.EncodeUint8(uint8(v2.IsUniform))
431 buf.EncodeUint32(uint32(v2.Label))
432 buf.EncodeUint8(uint8(v2.TTL))
433 buf.EncodeUint8(uint8(v2.Exp))
436 return buf.Bytes(), nil
438 func (m *MplsRouteDetails) Unmarshal(b []byte) error {
439 buf := codec.NewBuffer(b)
440 m.MrRoute.MrTableID = buf.DecodeUint32()
441 m.MrRoute.MrLabel = buf.DecodeUint32()
442 m.MrRoute.MrEos = buf.DecodeUint8()
443 m.MrRoute.MrEosProto = buf.DecodeUint8()
444 m.MrRoute.MrIsMulticast = buf.DecodeBool()
445 m.MrRoute.MrNPaths = buf.DecodeUint8()
446 m.MrRoute.MrPaths = make([]fib_types.FibPath, int(m.MrRoute.MrNPaths))
447 for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
448 m.MrRoute.MrPaths[j1].SwIfIndex = buf.DecodeUint32()
449 m.MrRoute.MrPaths[j1].TableID = buf.DecodeUint32()
450 m.MrRoute.MrPaths[j1].RpfID = buf.DecodeUint32()
451 m.MrRoute.MrPaths[j1].Weight = buf.DecodeUint8()
452 m.MrRoute.MrPaths[j1].Preference = buf.DecodeUint8()
453 m.MrRoute.MrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
454 m.MrRoute.MrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
455 m.MrRoute.MrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
456 copy(m.MrRoute.MrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
457 m.MrRoute.MrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
458 m.MrRoute.MrPaths[j1].Nh.ObjID = buf.DecodeUint32()
459 m.MrRoute.MrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
460 m.MrRoute.MrPaths[j1].NLabels = buf.DecodeUint8()
461 for j2 := 0; j2 < 16; j2++ {
462 m.MrRoute.MrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
463 m.MrRoute.MrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
464 m.MrRoute.MrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
465 m.MrRoute.MrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
471 // MplsRouteDump defines message 'mpls_route_dump'.
472 type MplsRouteDump struct {
473 Table MplsTable `binapi:"mpls_table,name=table" json:"table,omitempty"`
476 func (m *MplsRouteDump) Reset() { *m = MplsRouteDump{} }
477 func (*MplsRouteDump) GetMessageName() string { return "mpls_route_dump" }
478 func (*MplsRouteDump) GetCrcString() string { return "935fdefa" }
479 func (*MplsRouteDump) GetMessageType() api.MessageType {
480 return api.RequestMessage
483 func (m *MplsRouteDump) Size() int {
488 size += 4 // m.Table.MtTableID
489 size += 64 // m.Table.MtName
492 func (m *MplsRouteDump) Marshal(b []byte) ([]byte, error) {
493 var buf *codec.Buffer
495 buf = codec.NewBuffer(make([]byte, m.Size()))
497 buf = codec.NewBuffer(b)
499 buf.EncodeUint32(uint32(m.Table.MtTableID))
500 buf.EncodeString(m.Table.MtName, 64)
501 return buf.Bytes(), nil
503 func (m *MplsRouteDump) Unmarshal(b []byte) error {
504 buf := codec.NewBuffer(b)
505 m.Table.MtTableID = buf.DecodeUint32()
506 m.Table.MtName = buf.DecodeString(64)
510 // MplsTableAddDel defines message 'mpls_table_add_del'.
511 type MplsTableAddDel struct {
512 MtIsAdd bool `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"`
513 MtTable MplsTable `binapi:"mpls_table,name=mt_table" json:"mt_table,omitempty"`
516 func (m *MplsTableAddDel) Reset() { *m = MplsTableAddDel{} }
517 func (*MplsTableAddDel) GetMessageName() string { return "mpls_table_add_del" }
518 func (*MplsTableAddDel) GetCrcString() string { return "57817512" }
519 func (*MplsTableAddDel) GetMessageType() api.MessageType {
520 return api.RequestMessage
523 func (m *MplsTableAddDel) Size() int {
528 size += 1 // m.MtIsAdd
529 size += 4 // m.MtTable.MtTableID
530 size += 64 // m.MtTable.MtName
533 func (m *MplsTableAddDel) Marshal(b []byte) ([]byte, error) {
534 var buf *codec.Buffer
536 buf = codec.NewBuffer(make([]byte, m.Size()))
538 buf = codec.NewBuffer(b)
540 buf.EncodeBool(m.MtIsAdd)
541 buf.EncodeUint32(uint32(m.MtTable.MtTableID))
542 buf.EncodeString(m.MtTable.MtName, 64)
543 return buf.Bytes(), nil
545 func (m *MplsTableAddDel) Unmarshal(b []byte) error {
546 buf := codec.NewBuffer(b)
547 m.MtIsAdd = buf.DecodeBool()
548 m.MtTable.MtTableID = buf.DecodeUint32()
549 m.MtTable.MtName = buf.DecodeString(64)
553 // MplsTableAddDelReply defines message 'mpls_table_add_del_reply'.
554 type MplsTableAddDelReply struct {
555 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
558 func (m *MplsTableAddDelReply) Reset() { *m = MplsTableAddDelReply{} }
559 func (*MplsTableAddDelReply) GetMessageName() string { return "mpls_table_add_del_reply" }
560 func (*MplsTableAddDelReply) GetCrcString() string { return "e8d4e804" }
561 func (*MplsTableAddDelReply) GetMessageType() api.MessageType {
562 return api.ReplyMessage
565 func (m *MplsTableAddDelReply) Size() int {
570 size += 4 // m.Retval
573 func (m *MplsTableAddDelReply) Marshal(b []byte) ([]byte, error) {
574 var buf *codec.Buffer
576 buf = codec.NewBuffer(make([]byte, m.Size()))
578 buf = codec.NewBuffer(b)
580 buf.EncodeUint32(uint32(m.Retval))
581 return buf.Bytes(), nil
583 func (m *MplsTableAddDelReply) Unmarshal(b []byte) error {
584 buf := codec.NewBuffer(b)
585 m.Retval = int32(buf.DecodeUint32())
589 // MplsTableDetails defines message 'mpls_table_details'.
590 type MplsTableDetails struct {
591 MtTable MplsTable `binapi:"mpls_table,name=mt_table" json:"mt_table,omitempty"`
594 func (m *MplsTableDetails) Reset() { *m = MplsTableDetails{} }
595 func (*MplsTableDetails) GetMessageName() string { return "mpls_table_details" }
596 func (*MplsTableDetails) GetCrcString() string { return "f03ecdc8" }
597 func (*MplsTableDetails) GetMessageType() api.MessageType {
598 return api.ReplyMessage
601 func (m *MplsTableDetails) Size() int {
606 size += 4 // m.MtTable.MtTableID
607 size += 64 // m.MtTable.MtName
610 func (m *MplsTableDetails) Marshal(b []byte) ([]byte, error) {
611 var buf *codec.Buffer
613 buf = codec.NewBuffer(make([]byte, m.Size()))
615 buf = codec.NewBuffer(b)
617 buf.EncodeUint32(uint32(m.MtTable.MtTableID))
618 buf.EncodeString(m.MtTable.MtName, 64)
619 return buf.Bytes(), nil
621 func (m *MplsTableDetails) Unmarshal(b []byte) error {
622 buf := codec.NewBuffer(b)
623 m.MtTable.MtTableID = buf.DecodeUint32()
624 m.MtTable.MtName = buf.DecodeString(64)
628 // MplsTableDump defines message 'mpls_table_dump'.
629 type MplsTableDump struct{}
631 func (m *MplsTableDump) Reset() { *m = MplsTableDump{} }
632 func (*MplsTableDump) GetMessageName() string { return "mpls_table_dump" }
633 func (*MplsTableDump) GetCrcString() string { return "51077d14" }
634 func (*MplsTableDump) GetMessageType() api.MessageType {
635 return api.RequestMessage
638 func (m *MplsTableDump) Size() int {
645 func (m *MplsTableDump) Marshal(b []byte) ([]byte, error) {
646 var buf *codec.Buffer
648 buf = codec.NewBuffer(make([]byte, m.Size()))
650 buf = codec.NewBuffer(b)
652 return buf.Bytes(), nil
654 func (m *MplsTableDump) Unmarshal(b []byte) error {
658 // MplsTunnelAddDel defines message 'mpls_tunnel_add_del'.
659 type MplsTunnelAddDel struct {
660 MtIsAdd bool `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"`
661 MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"`
664 func (m *MplsTunnelAddDel) Reset() { *m = MplsTunnelAddDel{} }
665 func (*MplsTunnelAddDel) GetMessageName() string { return "mpls_tunnel_add_del" }
666 func (*MplsTunnelAddDel) GetCrcString() string { return "e57ce61d" }
667 func (*MplsTunnelAddDel) GetMessageType() api.MessageType {
668 return api.RequestMessage
671 func (m *MplsTunnelAddDel) Size() int {
676 size += 1 // m.MtIsAdd
677 size += 4 // m.MtTunnel.MtSwIfIndex
678 size += 4 // m.MtTunnel.MtTunnelIndex
679 size += 1 // m.MtTunnel.MtL2Only
680 size += 1 // m.MtTunnel.MtIsMulticast
681 size += 64 // m.MtTunnel.MtTag
682 size += 1 // m.MtTunnel.MtNPaths
683 for j2 := 0; j2 < len(m.MtTunnel.MtPaths); j2++ {
684 var s2 fib_types.FibPath
686 if j2 < len(m.MtTunnel.MtPaths) {
687 s2 = m.MtTunnel.MtPaths[j2]
689 size += 4 // s2.SwIfIndex
690 size += 4 // s2.TableID
691 size += 4 // s2.RpfID
692 size += 1 // s2.Weight
693 size += 1 // s2.Preference
695 size += 4 // s2.Flags
696 size += 4 // s2.Proto
697 size += 1 * 16 // s2.Nh.Address
698 size += 4 // s2.Nh.ViaLabel
699 size += 4 // s2.Nh.ObjID
700 size += 4 // s2.Nh.ClassifyTableIndex
701 size += 1 // s2.NLabels
702 for j3 := 0; j3 < 16; j3++ {
703 var s3 fib_types.FibMplsLabel
705 if j3 < len(s2.LabelStack) {
706 s3 = s2.LabelStack[j3]
708 size += 1 // s3.IsUniform
709 size += 4 // s3.Label
716 func (m *MplsTunnelAddDel) Marshal(b []byte) ([]byte, error) {
717 var buf *codec.Buffer
719 buf = codec.NewBuffer(make([]byte, m.Size()))
721 buf = codec.NewBuffer(b)
723 buf.EncodeBool(m.MtIsAdd)
724 buf.EncodeUint32(uint32(m.MtTunnel.MtSwIfIndex))
725 buf.EncodeUint32(uint32(m.MtTunnel.MtTunnelIndex))
726 buf.EncodeBool(m.MtTunnel.MtL2Only)
727 buf.EncodeBool(m.MtTunnel.MtIsMulticast)
728 buf.EncodeString(m.MtTunnel.MtTag, 64)
729 buf.EncodeUint8(uint8(len(m.MtTunnel.MtPaths)))
730 for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
731 var v1 fib_types.FibPath
732 if j1 < len(m.MtTunnel.MtPaths) {
733 v1 = m.MtTunnel.MtPaths[j1]
735 buf.EncodeUint32(uint32(v1.SwIfIndex))
736 buf.EncodeUint32(uint32(v1.TableID))
737 buf.EncodeUint32(uint32(v1.RpfID))
738 buf.EncodeUint8(uint8(v1.Weight))
739 buf.EncodeUint8(uint8(v1.Preference))
740 buf.EncodeUint32(uint32(v1.Type))
741 buf.EncodeUint32(uint32(v1.Flags))
742 buf.EncodeUint32(uint32(v1.Proto))
743 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
744 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
745 buf.EncodeUint32(uint32(v1.Nh.ObjID))
746 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
747 buf.EncodeUint8(uint8(v1.NLabels))
748 for j2 := 0; j2 < 16; j2++ {
749 var v2 fib_types.FibMplsLabel
750 if j2 < len(v1.LabelStack) {
751 v2 = v1.LabelStack[j2]
753 buf.EncodeUint8(uint8(v2.IsUniform))
754 buf.EncodeUint32(uint32(v2.Label))
755 buf.EncodeUint8(uint8(v2.TTL))
756 buf.EncodeUint8(uint8(v2.Exp))
759 return buf.Bytes(), nil
761 func (m *MplsTunnelAddDel) Unmarshal(b []byte) error {
762 buf := codec.NewBuffer(b)
763 m.MtIsAdd = buf.DecodeBool()
764 m.MtTunnel.MtSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
765 m.MtTunnel.MtTunnelIndex = buf.DecodeUint32()
766 m.MtTunnel.MtL2Only = buf.DecodeBool()
767 m.MtTunnel.MtIsMulticast = buf.DecodeBool()
768 m.MtTunnel.MtTag = buf.DecodeString(64)
769 m.MtTunnel.MtNPaths = buf.DecodeUint8()
770 m.MtTunnel.MtPaths = make([]fib_types.FibPath, int(m.MtTunnel.MtNPaths))
771 for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
772 m.MtTunnel.MtPaths[j1].SwIfIndex = buf.DecodeUint32()
773 m.MtTunnel.MtPaths[j1].TableID = buf.DecodeUint32()
774 m.MtTunnel.MtPaths[j1].RpfID = buf.DecodeUint32()
775 m.MtTunnel.MtPaths[j1].Weight = buf.DecodeUint8()
776 m.MtTunnel.MtPaths[j1].Preference = buf.DecodeUint8()
777 m.MtTunnel.MtPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
778 m.MtTunnel.MtPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
779 m.MtTunnel.MtPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
780 copy(m.MtTunnel.MtPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
781 m.MtTunnel.MtPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
782 m.MtTunnel.MtPaths[j1].Nh.ObjID = buf.DecodeUint32()
783 m.MtTunnel.MtPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
784 m.MtTunnel.MtPaths[j1].NLabels = buf.DecodeUint8()
785 for j2 := 0; j2 < 16; j2++ {
786 m.MtTunnel.MtPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
787 m.MtTunnel.MtPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
788 m.MtTunnel.MtPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
789 m.MtTunnel.MtPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
795 // MplsTunnelAddDelReply defines message 'mpls_tunnel_add_del_reply'.
796 type MplsTunnelAddDelReply struct {
797 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
798 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
799 TunnelIndex uint32 `binapi:"u32,name=tunnel_index" json:"tunnel_index,omitempty"`
802 func (m *MplsTunnelAddDelReply) Reset() { *m = MplsTunnelAddDelReply{} }
803 func (*MplsTunnelAddDelReply) GetMessageName() string { return "mpls_tunnel_add_del_reply" }
804 func (*MplsTunnelAddDelReply) GetCrcString() string { return "afb01472" }
805 func (*MplsTunnelAddDelReply) GetMessageType() api.MessageType {
806 return api.ReplyMessage
809 func (m *MplsTunnelAddDelReply) Size() int {
814 size += 4 // m.Retval
815 size += 4 // m.SwIfIndex
816 size += 4 // m.TunnelIndex
819 func (m *MplsTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
820 var buf *codec.Buffer
822 buf = codec.NewBuffer(make([]byte, m.Size()))
824 buf = codec.NewBuffer(b)
826 buf.EncodeUint32(uint32(m.Retval))
827 buf.EncodeUint32(uint32(m.SwIfIndex))
828 buf.EncodeUint32(uint32(m.TunnelIndex))
829 return buf.Bytes(), nil
831 func (m *MplsTunnelAddDelReply) Unmarshal(b []byte) error {
832 buf := codec.NewBuffer(b)
833 m.Retval = int32(buf.DecodeUint32())
834 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
835 m.TunnelIndex = buf.DecodeUint32()
839 // MplsTunnelDetails defines message 'mpls_tunnel_details'.
840 type MplsTunnelDetails struct {
841 MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"`
844 func (m *MplsTunnelDetails) Reset() { *m = MplsTunnelDetails{} }
845 func (*MplsTunnelDetails) GetMessageName() string { return "mpls_tunnel_details" }
846 func (*MplsTunnelDetails) GetCrcString() string { return "f3c0928e" }
847 func (*MplsTunnelDetails) GetMessageType() api.MessageType {
848 return api.ReplyMessage
851 func (m *MplsTunnelDetails) Size() int {
856 size += 4 // m.MtTunnel.MtSwIfIndex
857 size += 4 // m.MtTunnel.MtTunnelIndex
858 size += 1 // m.MtTunnel.MtL2Only
859 size += 1 // m.MtTunnel.MtIsMulticast
860 size += 64 // m.MtTunnel.MtTag
861 size += 1 // m.MtTunnel.MtNPaths
862 for j2 := 0; j2 < len(m.MtTunnel.MtPaths); j2++ {
863 var s2 fib_types.FibPath
865 if j2 < len(m.MtTunnel.MtPaths) {
866 s2 = m.MtTunnel.MtPaths[j2]
868 size += 4 // s2.SwIfIndex
869 size += 4 // s2.TableID
870 size += 4 // s2.RpfID
871 size += 1 // s2.Weight
872 size += 1 // s2.Preference
874 size += 4 // s2.Flags
875 size += 4 // s2.Proto
876 size += 1 * 16 // s2.Nh.Address
877 size += 4 // s2.Nh.ViaLabel
878 size += 4 // s2.Nh.ObjID
879 size += 4 // s2.Nh.ClassifyTableIndex
880 size += 1 // s2.NLabels
881 for j3 := 0; j3 < 16; j3++ {
882 var s3 fib_types.FibMplsLabel
884 if j3 < len(s2.LabelStack) {
885 s3 = s2.LabelStack[j3]
887 size += 1 // s3.IsUniform
888 size += 4 // s3.Label
895 func (m *MplsTunnelDetails) Marshal(b []byte) ([]byte, error) {
896 var buf *codec.Buffer
898 buf = codec.NewBuffer(make([]byte, m.Size()))
900 buf = codec.NewBuffer(b)
902 buf.EncodeUint32(uint32(m.MtTunnel.MtSwIfIndex))
903 buf.EncodeUint32(uint32(m.MtTunnel.MtTunnelIndex))
904 buf.EncodeBool(m.MtTunnel.MtL2Only)
905 buf.EncodeBool(m.MtTunnel.MtIsMulticast)
906 buf.EncodeString(m.MtTunnel.MtTag, 64)
907 buf.EncodeUint8(uint8(len(m.MtTunnel.MtPaths)))
908 for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
909 var v1 fib_types.FibPath
910 if j1 < len(m.MtTunnel.MtPaths) {
911 v1 = m.MtTunnel.MtPaths[j1]
913 buf.EncodeUint32(uint32(v1.SwIfIndex))
914 buf.EncodeUint32(uint32(v1.TableID))
915 buf.EncodeUint32(uint32(v1.RpfID))
916 buf.EncodeUint8(uint8(v1.Weight))
917 buf.EncodeUint8(uint8(v1.Preference))
918 buf.EncodeUint32(uint32(v1.Type))
919 buf.EncodeUint32(uint32(v1.Flags))
920 buf.EncodeUint32(uint32(v1.Proto))
921 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
922 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
923 buf.EncodeUint32(uint32(v1.Nh.ObjID))
924 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
925 buf.EncodeUint8(uint8(v1.NLabels))
926 for j2 := 0; j2 < 16; j2++ {
927 var v2 fib_types.FibMplsLabel
928 if j2 < len(v1.LabelStack) {
929 v2 = v1.LabelStack[j2]
931 buf.EncodeUint8(uint8(v2.IsUniform))
932 buf.EncodeUint32(uint32(v2.Label))
933 buf.EncodeUint8(uint8(v2.TTL))
934 buf.EncodeUint8(uint8(v2.Exp))
937 return buf.Bytes(), nil
939 func (m *MplsTunnelDetails) Unmarshal(b []byte) error {
940 buf := codec.NewBuffer(b)
941 m.MtTunnel.MtSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
942 m.MtTunnel.MtTunnelIndex = buf.DecodeUint32()
943 m.MtTunnel.MtL2Only = buf.DecodeBool()
944 m.MtTunnel.MtIsMulticast = buf.DecodeBool()
945 m.MtTunnel.MtTag = buf.DecodeString(64)
946 m.MtTunnel.MtNPaths = buf.DecodeUint8()
947 m.MtTunnel.MtPaths = make([]fib_types.FibPath, int(m.MtTunnel.MtNPaths))
948 for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
949 m.MtTunnel.MtPaths[j1].SwIfIndex = buf.DecodeUint32()
950 m.MtTunnel.MtPaths[j1].TableID = buf.DecodeUint32()
951 m.MtTunnel.MtPaths[j1].RpfID = buf.DecodeUint32()
952 m.MtTunnel.MtPaths[j1].Weight = buf.DecodeUint8()
953 m.MtTunnel.MtPaths[j1].Preference = buf.DecodeUint8()
954 m.MtTunnel.MtPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
955 m.MtTunnel.MtPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
956 m.MtTunnel.MtPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
957 copy(m.MtTunnel.MtPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
958 m.MtTunnel.MtPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
959 m.MtTunnel.MtPaths[j1].Nh.ObjID = buf.DecodeUint32()
960 m.MtTunnel.MtPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
961 m.MtTunnel.MtPaths[j1].NLabels = buf.DecodeUint8()
962 for j2 := 0; j2 < 16; j2++ {
963 m.MtTunnel.MtPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
964 m.MtTunnel.MtPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
965 m.MtTunnel.MtPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
966 m.MtTunnel.MtPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
972 // MplsTunnelDump defines message 'mpls_tunnel_dump'.
973 type MplsTunnelDump struct {
974 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
977 func (m *MplsTunnelDump) Reset() { *m = MplsTunnelDump{} }
978 func (*MplsTunnelDump) GetMessageName() string { return "mpls_tunnel_dump" }
979 func (*MplsTunnelDump) GetCrcString() string { return "f9e6675e" }
980 func (*MplsTunnelDump) GetMessageType() api.MessageType {
981 return api.RequestMessage
984 func (m *MplsTunnelDump) Size() int {
989 size += 4 // m.SwIfIndex
992 func (m *MplsTunnelDump) Marshal(b []byte) ([]byte, error) {
993 var buf *codec.Buffer
995 buf = codec.NewBuffer(make([]byte, m.Size()))
997 buf = codec.NewBuffer(b)
999 buf.EncodeUint32(uint32(m.SwIfIndex))
1000 return buf.Bytes(), nil
1002 func (m *MplsTunnelDump) Unmarshal(b []byte) error {
1003 buf := codec.NewBuffer(b)
1004 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1008 // SwInterfaceSetMplsEnable defines message 'sw_interface_set_mpls_enable'.
1009 type SwInterfaceSetMplsEnable struct {
1010 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1011 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
1014 func (m *SwInterfaceSetMplsEnable) Reset() { *m = SwInterfaceSetMplsEnable{} }
1015 func (*SwInterfaceSetMplsEnable) GetMessageName() string { return "sw_interface_set_mpls_enable" }
1016 func (*SwInterfaceSetMplsEnable) GetCrcString() string { return "ae6cfcfb" }
1017 func (*SwInterfaceSetMplsEnable) GetMessageType() api.MessageType {
1018 return api.RequestMessage
1021 func (m *SwInterfaceSetMplsEnable) Size() int {
1026 size += 4 // m.SwIfIndex
1027 size += 1 // m.Enable
1030 func (m *SwInterfaceSetMplsEnable) Marshal(b []byte) ([]byte, error) {
1031 var buf *codec.Buffer
1033 buf = codec.NewBuffer(make([]byte, m.Size()))
1035 buf = codec.NewBuffer(b)
1037 buf.EncodeUint32(uint32(m.SwIfIndex))
1038 buf.EncodeBool(m.Enable)
1039 return buf.Bytes(), nil
1041 func (m *SwInterfaceSetMplsEnable) Unmarshal(b []byte) error {
1042 buf := codec.NewBuffer(b)
1043 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1044 m.Enable = buf.DecodeBool()
1048 // SwInterfaceSetMplsEnableReply defines message 'sw_interface_set_mpls_enable_reply'.
1049 type SwInterfaceSetMplsEnableReply struct {
1050 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1053 func (m *SwInterfaceSetMplsEnableReply) Reset() { *m = SwInterfaceSetMplsEnableReply{} }
1054 func (*SwInterfaceSetMplsEnableReply) GetMessageName() string {
1055 return "sw_interface_set_mpls_enable_reply"
1057 func (*SwInterfaceSetMplsEnableReply) GetCrcString() string { return "e8d4e804" }
1058 func (*SwInterfaceSetMplsEnableReply) GetMessageType() api.MessageType {
1059 return api.ReplyMessage
1062 func (m *SwInterfaceSetMplsEnableReply) Size() int {
1067 size += 4 // m.Retval
1070 func (m *SwInterfaceSetMplsEnableReply) Marshal(b []byte) ([]byte, error) {
1071 var buf *codec.Buffer
1073 buf = codec.NewBuffer(make([]byte, m.Size()))
1075 buf = codec.NewBuffer(b)
1077 buf.EncodeUint32(uint32(m.Retval))
1078 return buf.Bytes(), nil
1080 func (m *SwInterfaceSetMplsEnableReply) Unmarshal(b []byte) error {
1081 buf := codec.NewBuffer(b)
1082 m.Retval = int32(buf.DecodeUint32())
1086 func init() { file_mpls_binapi_init() }
1087 func file_mpls_binapi_init() {
1088 api.RegisterMessage((*MplsIPBindUnbind)(nil), "mpls_ip_bind_unbind_48249a27")
1089 api.RegisterMessage((*MplsIPBindUnbindReply)(nil), "mpls_ip_bind_unbind_reply_e8d4e804")
1090 api.RegisterMessage((*MplsRouteAddDel)(nil), "mpls_route_add_del_343cff54")
1091 api.RegisterMessage((*MplsRouteAddDelReply)(nil), "mpls_route_add_del_reply_1992deab")
1092 api.RegisterMessage((*MplsRouteDetails)(nil), "mpls_route_details_d0ac384c")
1093 api.RegisterMessage((*MplsRouteDump)(nil), "mpls_route_dump_935fdefa")
1094 api.RegisterMessage((*MplsTableAddDel)(nil), "mpls_table_add_del_57817512")
1095 api.RegisterMessage((*MplsTableAddDelReply)(nil), "mpls_table_add_del_reply_e8d4e804")
1096 api.RegisterMessage((*MplsTableDetails)(nil), "mpls_table_details_f03ecdc8")
1097 api.RegisterMessage((*MplsTableDump)(nil), "mpls_table_dump_51077d14")
1098 api.RegisterMessage((*MplsTunnelAddDel)(nil), "mpls_tunnel_add_del_e57ce61d")
1099 api.RegisterMessage((*MplsTunnelAddDelReply)(nil), "mpls_tunnel_add_del_reply_afb01472")
1100 api.RegisterMessage((*MplsTunnelDetails)(nil), "mpls_tunnel_details_f3c0928e")
1101 api.RegisterMessage((*MplsTunnelDump)(nil), "mpls_tunnel_dump_f9e6675e")
1102 api.RegisterMessage((*SwInterfaceSetMplsEnable)(nil), "sw_interface_set_mpls_enable_ae6cfcfb")
1103 api.RegisterMessage((*SwInterfaceSetMplsEnableReply)(nil), "sw_interface_set_mpls_enable_reply_e8d4e804")
1106 // Messages returns list of all messages in this module.
1107 func AllMessages() []api.Message {
1108 return []api.Message{
1109 (*MplsIPBindUnbind)(nil),
1110 (*MplsIPBindUnbindReply)(nil),
1111 (*MplsRouteAddDel)(nil),
1112 (*MplsRouteAddDelReply)(nil),
1113 (*MplsRouteDetails)(nil),
1114 (*MplsRouteDump)(nil),
1115 (*MplsTableAddDel)(nil),
1116 (*MplsTableAddDelReply)(nil),
1117 (*MplsTableDetails)(nil),
1118 (*MplsTableDump)(nil),
1119 (*MplsTunnelAddDel)(nil),
1120 (*MplsTunnelAddDelReply)(nil),
1121 (*MplsTunnelDetails)(nil),
1122 (*MplsTunnelDump)(nil),
1123 (*SwInterfaceSetMplsEnable)(nil),
1124 (*SwInterfaceSetMplsEnableReply)(nil),