089a97034f0f983e6f0da933fd2f7bfbceea151c
[govpp.git] / binapi / bier / bier.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 bier contains generated bindings for API file bier.api.
7 //
8 // Contents:
9 //   2 structs
10 //  22 messages
11 //
12 package bier
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         fib_types "git.fd.io/govpp.git/binapi/fib_types"
17         _ "git.fd.io/govpp.git/binapi/ip_types"
18         codec "git.fd.io/govpp.git/codec"
19 )
20
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
26
27 const (
28         APIFile    = "bier"
29         APIVersion = "1.2.1"
30         VersionCrc = 0x9196a2d4
31 )
32
33 // BierRoute defines type 'bier_route'.
34 type BierRoute struct {
35         BrBp     uint32              `binapi:"u32,name=br_bp" json:"br_bp,omitempty"`
36         BrTblID  BierTableID         `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
37         BrNPaths uint8               `binapi:"u8,name=br_n_paths" json:"-"`
38         BrPaths  []fib_types.FibPath `binapi:"fib_path[br_n_paths],name=br_paths" json:"br_paths,omitempty"`
39 }
40
41 // BierTableID defines type 'bier_table_id'.
42 type BierTableID struct {
43         BtSet       uint8 `binapi:"u8,name=bt_set" json:"bt_set,omitempty"`
44         BtSubDomain uint8 `binapi:"u8,name=bt_sub_domain" json:"bt_sub_domain,omitempty"`
45         BtHdrLenID  uint8 `binapi:"u8,name=bt_hdr_len_id" json:"bt_hdr_len_id,omitempty"`
46 }
47
48 // BierDispEntryAddDel defines message 'bier_disp_entry_add_del'.
49 type BierDispEntryAddDel struct {
50         BdeBp           uint16              `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
51         BdeTblID        uint32              `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
52         BdeIsAdd        bool                `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
53         BdePayloadProto uint8               `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
54         BdeNPaths       uint8               `binapi:"u8,name=bde_n_paths" json:"-"`
55         BdePaths        []fib_types.FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
56 }
57
58 func (m *BierDispEntryAddDel) Reset()               { *m = BierDispEntryAddDel{} }
59 func (*BierDispEntryAddDel) GetMessageName() string { return "bier_disp_entry_add_del" }
60 func (*BierDispEntryAddDel) GetCrcString() string   { return "648323eb" }
61 func (*BierDispEntryAddDel) GetMessageType() api.MessageType {
62         return api.RequestMessage
63 }
64
65 func (m *BierDispEntryAddDel) Size() (size int) {
66         if m == nil {
67                 return 0
68         }
69         size += 2 // m.BdeBp
70         size += 4 // m.BdeTblID
71         size += 1 // m.BdeIsAdd
72         size += 1 // m.BdePayloadProto
73         size += 1 // m.BdeNPaths
74         for j1 := 0; j1 < len(m.BdePaths); j1++ {
75                 var s1 fib_types.FibPath
76                 _ = s1
77                 if j1 < len(m.BdePaths) {
78                         s1 = m.BdePaths[j1]
79                 }
80                 size += 4      // s1.SwIfIndex
81                 size += 4      // s1.TableID
82                 size += 4      // s1.RpfID
83                 size += 1      // s1.Weight
84                 size += 1      // s1.Preference
85                 size += 4      // s1.Type
86                 size += 4      // s1.Flags
87                 size += 4      // s1.Proto
88                 size += 1 * 16 // s1.Nh.Address
89                 size += 4      // s1.Nh.ViaLabel
90                 size += 4      // s1.Nh.ObjID
91                 size += 4      // s1.Nh.ClassifyTableIndex
92                 size += 1      // s1.NLabels
93                 for j2 := 0; j2 < 16; j2++ {
94                         size += 1 // s1.LabelStack[j2].IsUniform
95                         size += 4 // s1.LabelStack[j2].Label
96                         size += 1 // s1.LabelStack[j2].TTL
97                         size += 1 // s1.LabelStack[j2].Exp
98                 }
99         }
100         return size
101 }
102 func (m *BierDispEntryAddDel) Marshal(b []byte) ([]byte, error) {
103         if b == nil {
104                 b = make([]byte, m.Size())
105         }
106         buf := codec.NewBuffer(b)
107         buf.EncodeUint16(m.BdeBp)
108         buf.EncodeUint32(m.BdeTblID)
109         buf.EncodeBool(m.BdeIsAdd)
110         buf.EncodeUint8(m.BdePayloadProto)
111         buf.EncodeUint8(uint8(len(m.BdePaths)))
112         for j0 := 0; j0 < len(m.BdePaths); j0++ {
113                 var v0 fib_types.FibPath // BdePaths
114                 if j0 < len(m.BdePaths) {
115                         v0 = m.BdePaths[j0]
116                 }
117                 buf.EncodeUint32(v0.SwIfIndex)
118                 buf.EncodeUint32(v0.TableID)
119                 buf.EncodeUint32(v0.RpfID)
120                 buf.EncodeUint8(v0.Weight)
121                 buf.EncodeUint8(v0.Preference)
122                 buf.EncodeUint32(uint32(v0.Type))
123                 buf.EncodeUint32(uint32(v0.Flags))
124                 buf.EncodeUint32(uint32(v0.Proto))
125                 buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16)
126                 buf.EncodeUint32(v0.Nh.ViaLabel)
127                 buf.EncodeUint32(v0.Nh.ObjID)
128                 buf.EncodeUint32(v0.Nh.ClassifyTableIndex)
129                 buf.EncodeUint8(v0.NLabels)
130                 for j1 := 0; j1 < 16; j1++ {
131                         buf.EncodeUint8(v0.LabelStack[j1].IsUniform)
132                         buf.EncodeUint32(v0.LabelStack[j1].Label)
133                         buf.EncodeUint8(v0.LabelStack[j1].TTL)
134                         buf.EncodeUint8(v0.LabelStack[j1].Exp)
135                 }
136         }
137         return buf.Bytes(), nil
138 }
139 func (m *BierDispEntryAddDel) Unmarshal(b []byte) error {
140         buf := codec.NewBuffer(b)
141         m.BdeBp = buf.DecodeUint16()
142         m.BdeTblID = buf.DecodeUint32()
143         m.BdeIsAdd = buf.DecodeBool()
144         m.BdePayloadProto = buf.DecodeUint8()
145         m.BdeNPaths = buf.DecodeUint8()
146         m.BdePaths = make([]fib_types.FibPath, m.BdeNPaths)
147         for j0 := 0; j0 < len(m.BdePaths); j0++ {
148                 m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
149                 m.BdePaths[j0].TableID = buf.DecodeUint32()
150                 m.BdePaths[j0].RpfID = buf.DecodeUint32()
151                 m.BdePaths[j0].Weight = buf.DecodeUint8()
152                 m.BdePaths[j0].Preference = buf.DecodeUint8()
153                 m.BdePaths[j0].Type = fib_types.FibPathType(buf.DecodeUint32())
154                 m.BdePaths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
155                 m.BdePaths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
156                 copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
157                 m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
158                 m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
159                 m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
160                 m.BdePaths[j0].NLabels = buf.DecodeUint8()
161                 for j1 := 0; j1 < 16; j1++ {
162                         m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
163                         m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
164                         m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
165                         m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
166                 }
167         }
168         return nil
169 }
170
171 // BierDispEntryAddDelReply defines message 'bier_disp_entry_add_del_reply'.
172 type BierDispEntryAddDelReply struct {
173         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
174 }
175
176 func (m *BierDispEntryAddDelReply) Reset()               { *m = BierDispEntryAddDelReply{} }
177 func (*BierDispEntryAddDelReply) GetMessageName() string { return "bier_disp_entry_add_del_reply" }
178 func (*BierDispEntryAddDelReply) GetCrcString() string   { return "e8d4e804" }
179 func (*BierDispEntryAddDelReply) GetMessageType() api.MessageType {
180         return api.ReplyMessage
181 }
182
183 func (m *BierDispEntryAddDelReply) Size() (size int) {
184         if m == nil {
185                 return 0
186         }
187         size += 4 // m.Retval
188         return size
189 }
190 func (m *BierDispEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
191         if b == nil {
192                 b = make([]byte, m.Size())
193         }
194         buf := codec.NewBuffer(b)
195         buf.EncodeInt32(m.Retval)
196         return buf.Bytes(), nil
197 }
198 func (m *BierDispEntryAddDelReply) Unmarshal(b []byte) error {
199         buf := codec.NewBuffer(b)
200         m.Retval = buf.DecodeInt32()
201         return nil
202 }
203
204 // BierDispEntryDetails defines message 'bier_disp_entry_details'.
205 type BierDispEntryDetails struct {
206         BdeBp           uint16              `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
207         BdeTblID        uint32              `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
208         BdeIsAdd        bool                `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
209         BdePayloadProto uint8               `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
210         BdeNPaths       uint8               `binapi:"u8,name=bde_n_paths" json:"-"`
211         BdePaths        []fib_types.FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
212 }
213
214 func (m *BierDispEntryDetails) Reset()               { *m = BierDispEntryDetails{} }
215 func (*BierDispEntryDetails) GetMessageName() string { return "bier_disp_entry_details" }
216 func (*BierDispEntryDetails) GetCrcString() string   { return "e5b039a9" }
217 func (*BierDispEntryDetails) GetMessageType() api.MessageType {
218         return api.ReplyMessage
219 }
220
221 func (m *BierDispEntryDetails) Size() (size int) {
222         if m == nil {
223                 return 0
224         }
225         size += 2 // m.BdeBp
226         size += 4 // m.BdeTblID
227         size += 1 // m.BdeIsAdd
228         size += 1 // m.BdePayloadProto
229         size += 1 // m.BdeNPaths
230         for j1 := 0; j1 < len(m.BdePaths); j1++ {
231                 var s1 fib_types.FibPath
232                 _ = s1
233                 if j1 < len(m.BdePaths) {
234                         s1 = m.BdePaths[j1]
235                 }
236                 size += 4      // s1.SwIfIndex
237                 size += 4      // s1.TableID
238                 size += 4      // s1.RpfID
239                 size += 1      // s1.Weight
240                 size += 1      // s1.Preference
241                 size += 4      // s1.Type
242                 size += 4      // s1.Flags
243                 size += 4      // s1.Proto
244                 size += 1 * 16 // s1.Nh.Address
245                 size += 4      // s1.Nh.ViaLabel
246                 size += 4      // s1.Nh.ObjID
247                 size += 4      // s1.Nh.ClassifyTableIndex
248                 size += 1      // s1.NLabels
249                 for j2 := 0; j2 < 16; j2++ {
250                         size += 1 // s1.LabelStack[j2].IsUniform
251                         size += 4 // s1.LabelStack[j2].Label
252                         size += 1 // s1.LabelStack[j2].TTL
253                         size += 1 // s1.LabelStack[j2].Exp
254                 }
255         }
256         return size
257 }
258 func (m *BierDispEntryDetails) Marshal(b []byte) ([]byte, error) {
259         if b == nil {
260                 b = make([]byte, m.Size())
261         }
262         buf := codec.NewBuffer(b)
263         buf.EncodeUint16(m.BdeBp)
264         buf.EncodeUint32(m.BdeTblID)
265         buf.EncodeBool(m.BdeIsAdd)
266         buf.EncodeUint8(m.BdePayloadProto)
267         buf.EncodeUint8(uint8(len(m.BdePaths)))
268         for j0 := 0; j0 < len(m.BdePaths); j0++ {
269                 var v0 fib_types.FibPath // BdePaths
270                 if j0 < len(m.BdePaths) {
271                         v0 = m.BdePaths[j0]
272                 }
273                 buf.EncodeUint32(v0.SwIfIndex)
274                 buf.EncodeUint32(v0.TableID)
275                 buf.EncodeUint32(v0.RpfID)
276                 buf.EncodeUint8(v0.Weight)
277                 buf.EncodeUint8(v0.Preference)
278                 buf.EncodeUint32(uint32(v0.Type))
279                 buf.EncodeUint32(uint32(v0.Flags))
280                 buf.EncodeUint32(uint32(v0.Proto))
281                 buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16)
282                 buf.EncodeUint32(v0.Nh.ViaLabel)
283                 buf.EncodeUint32(v0.Nh.ObjID)
284                 buf.EncodeUint32(v0.Nh.ClassifyTableIndex)
285                 buf.EncodeUint8(v0.NLabels)
286                 for j1 := 0; j1 < 16; j1++ {
287                         buf.EncodeUint8(v0.LabelStack[j1].IsUniform)
288                         buf.EncodeUint32(v0.LabelStack[j1].Label)
289                         buf.EncodeUint8(v0.LabelStack[j1].TTL)
290                         buf.EncodeUint8(v0.LabelStack[j1].Exp)
291                 }
292         }
293         return buf.Bytes(), nil
294 }
295 func (m *BierDispEntryDetails) Unmarshal(b []byte) error {
296         buf := codec.NewBuffer(b)
297         m.BdeBp = buf.DecodeUint16()
298         m.BdeTblID = buf.DecodeUint32()
299         m.BdeIsAdd = buf.DecodeBool()
300         m.BdePayloadProto = buf.DecodeUint8()
301         m.BdeNPaths = buf.DecodeUint8()
302         m.BdePaths = make([]fib_types.FibPath, m.BdeNPaths)
303         for j0 := 0; j0 < len(m.BdePaths); j0++ {
304                 m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
305                 m.BdePaths[j0].TableID = buf.DecodeUint32()
306                 m.BdePaths[j0].RpfID = buf.DecodeUint32()
307                 m.BdePaths[j0].Weight = buf.DecodeUint8()
308                 m.BdePaths[j0].Preference = buf.DecodeUint8()
309                 m.BdePaths[j0].Type = fib_types.FibPathType(buf.DecodeUint32())
310                 m.BdePaths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
311                 m.BdePaths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
312                 copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
313                 m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
314                 m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
315                 m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
316                 m.BdePaths[j0].NLabels = buf.DecodeUint8()
317                 for j1 := 0; j1 < 16; j1++ {
318                         m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
319                         m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
320                         m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
321                         m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
322                 }
323         }
324         return nil
325 }
326
327 // BierDispEntryDump defines message 'bier_disp_entry_dump'.
328 type BierDispEntryDump struct {
329         BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
330 }
331
332 func (m *BierDispEntryDump) Reset()               { *m = BierDispEntryDump{} }
333 func (*BierDispEntryDump) GetMessageName() string { return "bier_disp_entry_dump" }
334 func (*BierDispEntryDump) GetCrcString() string   { return "b5fa54ad" }
335 func (*BierDispEntryDump) GetMessageType() api.MessageType {
336         return api.RequestMessage
337 }
338
339 func (m *BierDispEntryDump) Size() (size int) {
340         if m == nil {
341                 return 0
342         }
343         size += 4 // m.BdeTblID
344         return size
345 }
346 func (m *BierDispEntryDump) Marshal(b []byte) ([]byte, error) {
347         if b == nil {
348                 b = make([]byte, m.Size())
349         }
350         buf := codec.NewBuffer(b)
351         buf.EncodeUint32(m.BdeTblID)
352         return buf.Bytes(), nil
353 }
354 func (m *BierDispEntryDump) Unmarshal(b []byte) error {
355         buf := codec.NewBuffer(b)
356         m.BdeTblID = buf.DecodeUint32()
357         return nil
358 }
359
360 // BierDispTableAddDel defines message 'bier_disp_table_add_del'.
361 type BierDispTableAddDel struct {
362         BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
363         BdtIsAdd bool   `binapi:"bool,name=bdt_is_add" json:"bdt_is_add,omitempty"`
364 }
365
366 func (m *BierDispTableAddDel) Reset()               { *m = BierDispTableAddDel{} }
367 func (*BierDispTableAddDel) GetMessageName() string { return "bier_disp_table_add_del" }
368 func (*BierDispTableAddDel) GetCrcString() string   { return "889657ac" }
369 func (*BierDispTableAddDel) GetMessageType() api.MessageType {
370         return api.RequestMessage
371 }
372
373 func (m *BierDispTableAddDel) Size() (size int) {
374         if m == nil {
375                 return 0
376         }
377         size += 4 // m.BdtTblID
378         size += 1 // m.BdtIsAdd
379         return size
380 }
381 func (m *BierDispTableAddDel) Marshal(b []byte) ([]byte, error) {
382         if b == nil {
383                 b = make([]byte, m.Size())
384         }
385         buf := codec.NewBuffer(b)
386         buf.EncodeUint32(m.BdtTblID)
387         buf.EncodeBool(m.BdtIsAdd)
388         return buf.Bytes(), nil
389 }
390 func (m *BierDispTableAddDel) Unmarshal(b []byte) error {
391         buf := codec.NewBuffer(b)
392         m.BdtTblID = buf.DecodeUint32()
393         m.BdtIsAdd = buf.DecodeBool()
394         return nil
395 }
396
397 // BierDispTableAddDelReply defines message 'bier_disp_table_add_del_reply'.
398 type BierDispTableAddDelReply struct {
399         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
400 }
401
402 func (m *BierDispTableAddDelReply) Reset()               { *m = BierDispTableAddDelReply{} }
403 func (*BierDispTableAddDelReply) GetMessageName() string { return "bier_disp_table_add_del_reply" }
404 func (*BierDispTableAddDelReply) GetCrcString() string   { return "e8d4e804" }
405 func (*BierDispTableAddDelReply) GetMessageType() api.MessageType {
406         return api.ReplyMessage
407 }
408
409 func (m *BierDispTableAddDelReply) Size() (size int) {
410         if m == nil {
411                 return 0
412         }
413         size += 4 // m.Retval
414         return size
415 }
416 func (m *BierDispTableAddDelReply) Marshal(b []byte) ([]byte, error) {
417         if b == nil {
418                 b = make([]byte, m.Size())
419         }
420         buf := codec.NewBuffer(b)
421         buf.EncodeInt32(m.Retval)
422         return buf.Bytes(), nil
423 }
424 func (m *BierDispTableAddDelReply) Unmarshal(b []byte) error {
425         buf := codec.NewBuffer(b)
426         m.Retval = buf.DecodeInt32()
427         return nil
428 }
429
430 // BierDispTableDetails defines message 'bier_disp_table_details'.
431 type BierDispTableDetails struct {
432         BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
433 }
434
435 func (m *BierDispTableDetails) Reset()               { *m = BierDispTableDetails{} }
436 func (*BierDispTableDetails) GetMessageName() string { return "bier_disp_table_details" }
437 func (*BierDispTableDetails) GetCrcString() string   { return "d27942c0" }
438 func (*BierDispTableDetails) GetMessageType() api.MessageType {
439         return api.ReplyMessage
440 }
441
442 func (m *BierDispTableDetails) Size() (size int) {
443         if m == nil {
444                 return 0
445         }
446         size += 4 // m.BdtTblID
447         return size
448 }
449 func (m *BierDispTableDetails) Marshal(b []byte) ([]byte, error) {
450         if b == nil {
451                 b = make([]byte, m.Size())
452         }
453         buf := codec.NewBuffer(b)
454         buf.EncodeUint32(m.BdtTblID)
455         return buf.Bytes(), nil
456 }
457 func (m *BierDispTableDetails) Unmarshal(b []byte) error {
458         buf := codec.NewBuffer(b)
459         m.BdtTblID = buf.DecodeUint32()
460         return nil
461 }
462
463 // BierDispTableDump defines message 'bier_disp_table_dump'.
464 type BierDispTableDump struct{}
465
466 func (m *BierDispTableDump) Reset()               { *m = BierDispTableDump{} }
467 func (*BierDispTableDump) GetMessageName() string { return "bier_disp_table_dump" }
468 func (*BierDispTableDump) GetCrcString() string   { return "51077d14" }
469 func (*BierDispTableDump) GetMessageType() api.MessageType {
470         return api.RequestMessage
471 }
472
473 func (m *BierDispTableDump) Size() (size int) {
474         if m == nil {
475                 return 0
476         }
477         return size
478 }
479 func (m *BierDispTableDump) Marshal(b []byte) ([]byte, error) {
480         if b == nil {
481                 b = make([]byte, m.Size())
482         }
483         buf := codec.NewBuffer(b)
484         return buf.Bytes(), nil
485 }
486 func (m *BierDispTableDump) Unmarshal(b []byte) error {
487         return nil
488 }
489
490 // BierImpAdd defines message 'bier_imp_add'.
491 type BierImpAdd struct {
492         BiTblID  BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
493         BiSrc    uint16      `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
494         BiNBytes uint8       `binapi:"u8,name=bi_n_bytes" json:"-"`
495         BiBytes  []byte      `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
496 }
497
498 func (m *BierImpAdd) Reset()               { *m = BierImpAdd{} }
499 func (*BierImpAdd) GetMessageName() string { return "bier_imp_add" }
500 func (*BierImpAdd) GetCrcString() string   { return "3856dc3d" }
501 func (*BierImpAdd) GetMessageType() api.MessageType {
502         return api.RequestMessage
503 }
504
505 func (m *BierImpAdd) Size() (size int) {
506         if m == nil {
507                 return 0
508         }
509         size += 1                  // m.BiTblID.BtSet
510         size += 1                  // m.BiTblID.BtSubDomain
511         size += 1                  // m.BiTblID.BtHdrLenID
512         size += 2                  // m.BiSrc
513         size += 1                  // m.BiNBytes
514         size += 1 * len(m.BiBytes) // m.BiBytes
515         return size
516 }
517 func (m *BierImpAdd) Marshal(b []byte) ([]byte, error) {
518         if b == nil {
519                 b = make([]byte, m.Size())
520         }
521         buf := codec.NewBuffer(b)
522         buf.EncodeUint8(m.BiTblID.BtSet)
523         buf.EncodeUint8(m.BiTblID.BtSubDomain)
524         buf.EncodeUint8(m.BiTblID.BtHdrLenID)
525         buf.EncodeUint16(m.BiSrc)
526         buf.EncodeUint8(uint8(len(m.BiBytes)))
527         buf.EncodeBytes(m.BiBytes, 0)
528         return buf.Bytes(), nil
529 }
530 func (m *BierImpAdd) Unmarshal(b []byte) error {
531         buf := codec.NewBuffer(b)
532         m.BiTblID.BtSet = buf.DecodeUint8()
533         m.BiTblID.BtSubDomain = buf.DecodeUint8()
534         m.BiTblID.BtHdrLenID = buf.DecodeUint8()
535         m.BiSrc = buf.DecodeUint16()
536         m.BiNBytes = buf.DecodeUint8()
537         m.BiBytes = make([]byte, m.BiNBytes)
538         copy(m.BiBytes, buf.DecodeBytes(len(m.BiBytes)))
539         return nil
540 }
541
542 // BierImpAddReply defines message 'bier_imp_add_reply'.
543 type BierImpAddReply struct {
544         Retval  int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
545         BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
546 }
547
548 func (m *BierImpAddReply) Reset()               { *m = BierImpAddReply{} }
549 func (*BierImpAddReply) GetMessageName() string { return "bier_imp_add_reply" }
550 func (*BierImpAddReply) GetCrcString() string   { return "d49c5793" }
551 func (*BierImpAddReply) GetMessageType() api.MessageType {
552         return api.ReplyMessage
553 }
554
555 func (m *BierImpAddReply) Size() (size int) {
556         if m == nil {
557                 return 0
558         }
559         size += 4 // m.Retval
560         size += 4 // m.BiIndex
561         return size
562 }
563 func (m *BierImpAddReply) Marshal(b []byte) ([]byte, error) {
564         if b == nil {
565                 b = make([]byte, m.Size())
566         }
567         buf := codec.NewBuffer(b)
568         buf.EncodeInt32(m.Retval)
569         buf.EncodeUint32(m.BiIndex)
570         return buf.Bytes(), nil
571 }
572 func (m *BierImpAddReply) Unmarshal(b []byte) error {
573         buf := codec.NewBuffer(b)
574         m.Retval = buf.DecodeInt32()
575         m.BiIndex = buf.DecodeUint32()
576         return nil
577 }
578
579 // BierImpDel defines message 'bier_imp_del'.
580 type BierImpDel struct {
581         BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
582 }
583
584 func (m *BierImpDel) Reset()               { *m = BierImpDel{} }
585 func (*BierImpDel) GetMessageName() string { return "bier_imp_del" }
586 func (*BierImpDel) GetCrcString() string   { return "7d45edf6" }
587 func (*BierImpDel) GetMessageType() api.MessageType {
588         return api.RequestMessage
589 }
590
591 func (m *BierImpDel) Size() (size int) {
592         if m == nil {
593                 return 0
594         }
595         size += 4 // m.BiIndex
596         return size
597 }
598 func (m *BierImpDel) Marshal(b []byte) ([]byte, error) {
599         if b == nil {
600                 b = make([]byte, m.Size())
601         }
602         buf := codec.NewBuffer(b)
603         buf.EncodeUint32(m.BiIndex)
604         return buf.Bytes(), nil
605 }
606 func (m *BierImpDel) Unmarshal(b []byte) error {
607         buf := codec.NewBuffer(b)
608         m.BiIndex = buf.DecodeUint32()
609         return nil
610 }
611
612 // BierImpDelReply defines message 'bier_imp_del_reply'.
613 type BierImpDelReply struct {
614         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
615 }
616
617 func (m *BierImpDelReply) Reset()               { *m = BierImpDelReply{} }
618 func (*BierImpDelReply) GetMessageName() string { return "bier_imp_del_reply" }
619 func (*BierImpDelReply) GetCrcString() string   { return "e8d4e804" }
620 func (*BierImpDelReply) GetMessageType() api.MessageType {
621         return api.ReplyMessage
622 }
623
624 func (m *BierImpDelReply) Size() (size int) {
625         if m == nil {
626                 return 0
627         }
628         size += 4 // m.Retval
629         return size
630 }
631 func (m *BierImpDelReply) Marshal(b []byte) ([]byte, error) {
632         if b == nil {
633                 b = make([]byte, m.Size())
634         }
635         buf := codec.NewBuffer(b)
636         buf.EncodeInt32(m.Retval)
637         return buf.Bytes(), nil
638 }
639 func (m *BierImpDelReply) Unmarshal(b []byte) error {
640         buf := codec.NewBuffer(b)
641         m.Retval = buf.DecodeInt32()
642         return nil
643 }
644
645 // BierImpDetails defines message 'bier_imp_details'.
646 type BierImpDetails struct {
647         BiTblID  BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
648         BiSrc    uint16      `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
649         BiNBytes uint8       `binapi:"u8,name=bi_n_bytes" json:"-"`
650         BiBytes  []byte      `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
651 }
652
653 func (m *BierImpDetails) Reset()               { *m = BierImpDetails{} }
654 func (*BierImpDetails) GetMessageName() string { return "bier_imp_details" }
655 func (*BierImpDetails) GetCrcString() string   { return "b76192df" }
656 func (*BierImpDetails) GetMessageType() api.MessageType {
657         return api.ReplyMessage
658 }
659
660 func (m *BierImpDetails) Size() (size int) {
661         if m == nil {
662                 return 0
663         }
664         size += 1                  // m.BiTblID.BtSet
665         size += 1                  // m.BiTblID.BtSubDomain
666         size += 1                  // m.BiTblID.BtHdrLenID
667         size += 2                  // m.BiSrc
668         size += 1                  // m.BiNBytes
669         size += 1 * len(m.BiBytes) // m.BiBytes
670         return size
671 }
672 func (m *BierImpDetails) Marshal(b []byte) ([]byte, error) {
673         if b == nil {
674                 b = make([]byte, m.Size())
675         }
676         buf := codec.NewBuffer(b)
677         buf.EncodeUint8(m.BiTblID.BtSet)
678         buf.EncodeUint8(m.BiTblID.BtSubDomain)
679         buf.EncodeUint8(m.BiTblID.BtHdrLenID)
680         buf.EncodeUint16(m.BiSrc)
681         buf.EncodeUint8(uint8(len(m.BiBytes)))
682         buf.EncodeBytes(m.BiBytes, 0)
683         return buf.Bytes(), nil
684 }
685 func (m *BierImpDetails) Unmarshal(b []byte) error {
686         buf := codec.NewBuffer(b)
687         m.BiTblID.BtSet = buf.DecodeUint8()
688         m.BiTblID.BtSubDomain = buf.DecodeUint8()
689         m.BiTblID.BtHdrLenID = buf.DecodeUint8()
690         m.BiSrc = buf.DecodeUint16()
691         m.BiNBytes = buf.DecodeUint8()
692         m.BiBytes = make([]byte, m.BiNBytes)
693         copy(m.BiBytes, buf.DecodeBytes(len(m.BiBytes)))
694         return nil
695 }
696
697 // BierImpDump defines message 'bier_imp_dump'.
698 type BierImpDump struct{}
699
700 func (m *BierImpDump) Reset()               { *m = BierImpDump{} }
701 func (*BierImpDump) GetMessageName() string { return "bier_imp_dump" }
702 func (*BierImpDump) GetCrcString() string   { return "51077d14" }
703 func (*BierImpDump) GetMessageType() api.MessageType {
704         return api.RequestMessage
705 }
706
707 func (m *BierImpDump) Size() (size int) {
708         if m == nil {
709                 return 0
710         }
711         return size
712 }
713 func (m *BierImpDump) Marshal(b []byte) ([]byte, error) {
714         if b == nil {
715                 b = make([]byte, m.Size())
716         }
717         buf := codec.NewBuffer(b)
718         return buf.Bytes(), nil
719 }
720 func (m *BierImpDump) Unmarshal(b []byte) error {
721         return nil
722 }
723
724 // BierRouteAddDel defines message 'bier_route_add_del'.
725 type BierRouteAddDel struct {
726         BrIsAdd     bool      `binapi:"bool,name=br_is_add" json:"br_is_add,omitempty"`
727         BrIsReplace bool      `binapi:"bool,name=br_is_replace" json:"br_is_replace,omitempty"`
728         BrRoute     BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
729 }
730
731 func (m *BierRouteAddDel) Reset()               { *m = BierRouteAddDel{} }
732 func (*BierRouteAddDel) GetMessageName() string { return "bier_route_add_del" }
733 func (*BierRouteAddDel) GetCrcString() string   { return "f29edca0" }
734 func (*BierRouteAddDel) GetMessageType() api.MessageType {
735         return api.RequestMessage
736 }
737
738 func (m *BierRouteAddDel) Size() (size int) {
739         if m == nil {
740                 return 0
741         }
742         size += 1 // m.BrIsAdd
743         size += 1 // m.BrIsReplace
744         size += 4 // m.BrRoute.BrBp
745         size += 1 // m.BrRoute.BrTblID.BtSet
746         size += 1 // m.BrRoute.BrTblID.BtSubDomain
747         size += 1 // m.BrRoute.BrTblID.BtHdrLenID
748         size += 1 // m.BrRoute.BrNPaths
749         for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
750                 var s2 fib_types.FibPath
751                 _ = s2
752                 if j2 < len(m.BrRoute.BrPaths) {
753                         s2 = m.BrRoute.BrPaths[j2]
754                 }
755                 size += 4      // s2.SwIfIndex
756                 size += 4      // s2.TableID
757                 size += 4      // s2.RpfID
758                 size += 1      // s2.Weight
759                 size += 1      // s2.Preference
760                 size += 4      // s2.Type
761                 size += 4      // s2.Flags
762                 size += 4      // s2.Proto
763                 size += 1 * 16 // s2.Nh.Address
764                 size += 4      // s2.Nh.ViaLabel
765                 size += 4      // s2.Nh.ObjID
766                 size += 4      // s2.Nh.ClassifyTableIndex
767                 size += 1      // s2.NLabels
768                 for j3 := 0; j3 < 16; j3++ {
769                         size += 1 // s2.LabelStack[j3].IsUniform
770                         size += 4 // s2.LabelStack[j3].Label
771                         size += 1 // s2.LabelStack[j3].TTL
772                         size += 1 // s2.LabelStack[j3].Exp
773                 }
774         }
775         return size
776 }
777 func (m *BierRouteAddDel) Marshal(b []byte) ([]byte, error) {
778         if b == nil {
779                 b = make([]byte, m.Size())
780         }
781         buf := codec.NewBuffer(b)
782         buf.EncodeBool(m.BrIsAdd)
783         buf.EncodeBool(m.BrIsReplace)
784         buf.EncodeUint32(m.BrRoute.BrBp)
785         buf.EncodeUint8(m.BrRoute.BrTblID.BtSet)
786         buf.EncodeUint8(m.BrRoute.BrTblID.BtSubDomain)
787         buf.EncodeUint8(m.BrRoute.BrTblID.BtHdrLenID)
788         buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
789         for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
790                 var v1 fib_types.FibPath // BrPaths
791                 if j1 < len(m.BrRoute.BrPaths) {
792                         v1 = m.BrRoute.BrPaths[j1]
793                 }
794                 buf.EncodeUint32(v1.SwIfIndex)
795                 buf.EncodeUint32(v1.TableID)
796                 buf.EncodeUint32(v1.RpfID)
797                 buf.EncodeUint8(v1.Weight)
798                 buf.EncodeUint8(v1.Preference)
799                 buf.EncodeUint32(uint32(v1.Type))
800                 buf.EncodeUint32(uint32(v1.Flags))
801                 buf.EncodeUint32(uint32(v1.Proto))
802                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
803                 buf.EncodeUint32(v1.Nh.ViaLabel)
804                 buf.EncodeUint32(v1.Nh.ObjID)
805                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
806                 buf.EncodeUint8(v1.NLabels)
807                 for j2 := 0; j2 < 16; j2++ {
808                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
809                         buf.EncodeUint32(v1.LabelStack[j2].Label)
810                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
811                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
812                 }
813         }
814         return buf.Bytes(), nil
815 }
816 func (m *BierRouteAddDel) Unmarshal(b []byte) error {
817         buf := codec.NewBuffer(b)
818         m.BrIsAdd = buf.DecodeBool()
819         m.BrIsReplace = buf.DecodeBool()
820         m.BrRoute.BrBp = buf.DecodeUint32()
821         m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
822         m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
823         m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
824         m.BrRoute.BrNPaths = buf.DecodeUint8()
825         m.BrRoute.BrPaths = make([]fib_types.FibPath, m.BrRoute.BrNPaths)
826         for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
827                 m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
828                 m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
829                 m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
830                 m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
831                 m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
832                 m.BrRoute.BrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
833                 m.BrRoute.BrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
834                 m.BrRoute.BrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
835                 copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
836                 m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
837                 m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
838                 m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
839                 m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
840                 for j2 := 0; j2 < 16; j2++ {
841                         m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
842                         m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
843                         m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
844                         m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
845                 }
846         }
847         return nil
848 }
849
850 // BierRouteAddDelReply defines message 'bier_route_add_del_reply'.
851 type BierRouteAddDelReply struct {
852         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
853 }
854
855 func (m *BierRouteAddDelReply) Reset()               { *m = BierRouteAddDelReply{} }
856 func (*BierRouteAddDelReply) GetMessageName() string { return "bier_route_add_del_reply" }
857 func (*BierRouteAddDelReply) GetCrcString() string   { return "e8d4e804" }
858 func (*BierRouteAddDelReply) GetMessageType() api.MessageType {
859         return api.ReplyMessage
860 }
861
862 func (m *BierRouteAddDelReply) Size() (size int) {
863         if m == nil {
864                 return 0
865         }
866         size += 4 // m.Retval
867         return size
868 }
869 func (m *BierRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
870         if b == nil {
871                 b = make([]byte, m.Size())
872         }
873         buf := codec.NewBuffer(b)
874         buf.EncodeInt32(m.Retval)
875         return buf.Bytes(), nil
876 }
877 func (m *BierRouteAddDelReply) Unmarshal(b []byte) error {
878         buf := codec.NewBuffer(b)
879         m.Retval = buf.DecodeInt32()
880         return nil
881 }
882
883 // BierRouteDetails defines message 'bier_route_details'.
884 type BierRouteDetails struct {
885         BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
886 }
887
888 func (m *BierRouteDetails) Reset()               { *m = BierRouteDetails{} }
889 func (*BierRouteDetails) GetMessageName() string { return "bier_route_details" }
890 func (*BierRouteDetails) GetCrcString() string   { return "39ee6a56" }
891 func (*BierRouteDetails) GetMessageType() api.MessageType {
892         return api.ReplyMessage
893 }
894
895 func (m *BierRouteDetails) Size() (size int) {
896         if m == nil {
897                 return 0
898         }
899         size += 4 // m.BrRoute.BrBp
900         size += 1 // m.BrRoute.BrTblID.BtSet
901         size += 1 // m.BrRoute.BrTblID.BtSubDomain
902         size += 1 // m.BrRoute.BrTblID.BtHdrLenID
903         size += 1 // m.BrRoute.BrNPaths
904         for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
905                 var s2 fib_types.FibPath
906                 _ = s2
907                 if j2 < len(m.BrRoute.BrPaths) {
908                         s2 = m.BrRoute.BrPaths[j2]
909                 }
910                 size += 4      // s2.SwIfIndex
911                 size += 4      // s2.TableID
912                 size += 4      // s2.RpfID
913                 size += 1      // s2.Weight
914                 size += 1      // s2.Preference
915                 size += 4      // s2.Type
916                 size += 4      // s2.Flags
917                 size += 4      // s2.Proto
918                 size += 1 * 16 // s2.Nh.Address
919                 size += 4      // s2.Nh.ViaLabel
920                 size += 4      // s2.Nh.ObjID
921                 size += 4      // s2.Nh.ClassifyTableIndex
922                 size += 1      // s2.NLabels
923                 for j3 := 0; j3 < 16; j3++ {
924                         size += 1 // s2.LabelStack[j3].IsUniform
925                         size += 4 // s2.LabelStack[j3].Label
926                         size += 1 // s2.LabelStack[j3].TTL
927                         size += 1 // s2.LabelStack[j3].Exp
928                 }
929         }
930         return size
931 }
932 func (m *BierRouteDetails) Marshal(b []byte) ([]byte, error) {
933         if b == nil {
934                 b = make([]byte, m.Size())
935         }
936         buf := codec.NewBuffer(b)
937         buf.EncodeUint32(m.BrRoute.BrBp)
938         buf.EncodeUint8(m.BrRoute.BrTblID.BtSet)
939         buf.EncodeUint8(m.BrRoute.BrTblID.BtSubDomain)
940         buf.EncodeUint8(m.BrRoute.BrTblID.BtHdrLenID)
941         buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
942         for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
943                 var v1 fib_types.FibPath // BrPaths
944                 if j1 < len(m.BrRoute.BrPaths) {
945                         v1 = m.BrRoute.BrPaths[j1]
946                 }
947                 buf.EncodeUint32(v1.SwIfIndex)
948                 buf.EncodeUint32(v1.TableID)
949                 buf.EncodeUint32(v1.RpfID)
950                 buf.EncodeUint8(v1.Weight)
951                 buf.EncodeUint8(v1.Preference)
952                 buf.EncodeUint32(uint32(v1.Type))
953                 buf.EncodeUint32(uint32(v1.Flags))
954                 buf.EncodeUint32(uint32(v1.Proto))
955                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
956                 buf.EncodeUint32(v1.Nh.ViaLabel)
957                 buf.EncodeUint32(v1.Nh.ObjID)
958                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
959                 buf.EncodeUint8(v1.NLabels)
960                 for j2 := 0; j2 < 16; j2++ {
961                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
962                         buf.EncodeUint32(v1.LabelStack[j2].Label)
963                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
964                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
965                 }
966         }
967         return buf.Bytes(), nil
968 }
969 func (m *BierRouteDetails) Unmarshal(b []byte) error {
970         buf := codec.NewBuffer(b)
971         m.BrRoute.BrBp = buf.DecodeUint32()
972         m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
973         m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
974         m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
975         m.BrRoute.BrNPaths = buf.DecodeUint8()
976         m.BrRoute.BrPaths = make([]fib_types.FibPath, m.BrRoute.BrNPaths)
977         for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
978                 m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
979                 m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
980                 m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
981                 m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
982                 m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
983                 m.BrRoute.BrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
984                 m.BrRoute.BrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
985                 m.BrRoute.BrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
986                 copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
987                 m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
988                 m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
989                 m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
990                 m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
991                 for j2 := 0; j2 < 16; j2++ {
992                         m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
993                         m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
994                         m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
995                         m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
996                 }
997         }
998         return nil
999 }
1000
1001 // BierRouteDump defines message 'bier_route_dump'.
1002 type BierRouteDump struct {
1003         BrTblID BierTableID `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
1004 }
1005
1006 func (m *BierRouteDump) Reset()               { *m = BierRouteDump{} }
1007 func (*BierRouteDump) GetMessageName() string { return "bier_route_dump" }
1008 func (*BierRouteDump) GetCrcString() string   { return "38339846" }
1009 func (*BierRouteDump) GetMessageType() api.MessageType {
1010         return api.RequestMessage
1011 }
1012
1013 func (m *BierRouteDump) Size() (size int) {
1014         if m == nil {
1015                 return 0
1016         }
1017         size += 1 // m.BrTblID.BtSet
1018         size += 1 // m.BrTblID.BtSubDomain
1019         size += 1 // m.BrTblID.BtHdrLenID
1020         return size
1021 }
1022 func (m *BierRouteDump) Marshal(b []byte) ([]byte, error) {
1023         if b == nil {
1024                 b = make([]byte, m.Size())
1025         }
1026         buf := codec.NewBuffer(b)
1027         buf.EncodeUint8(m.BrTblID.BtSet)
1028         buf.EncodeUint8(m.BrTblID.BtSubDomain)
1029         buf.EncodeUint8(m.BrTblID.BtHdrLenID)
1030         return buf.Bytes(), nil
1031 }
1032 func (m *BierRouteDump) Unmarshal(b []byte) error {
1033         buf := codec.NewBuffer(b)
1034         m.BrTblID.BtSet = buf.DecodeUint8()
1035         m.BrTblID.BtSubDomain = buf.DecodeUint8()
1036         m.BrTblID.BtHdrLenID = buf.DecodeUint8()
1037         return nil
1038 }
1039
1040 // BierTableAddDel defines message 'bier_table_add_del'.
1041 type BierTableAddDel struct {
1042         BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
1043         BtLabel uint32      `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
1044         BtIsAdd bool        `binapi:"bool,name=bt_is_add" json:"bt_is_add,omitempty"`
1045 }
1046
1047 func (m *BierTableAddDel) Reset()               { *m = BierTableAddDel{} }
1048 func (*BierTableAddDel) GetMessageName() string { return "bier_table_add_del" }
1049 func (*BierTableAddDel) GetCrcString() string   { return "35e59209" }
1050 func (*BierTableAddDel) GetMessageType() api.MessageType {
1051         return api.RequestMessage
1052 }
1053
1054 func (m *BierTableAddDel) Size() (size int) {
1055         if m == nil {
1056                 return 0
1057         }
1058         size += 1 // m.BtTblID.BtSet
1059         size += 1 // m.BtTblID.BtSubDomain
1060         size += 1 // m.BtTblID.BtHdrLenID
1061         size += 4 // m.BtLabel
1062         size += 1 // m.BtIsAdd
1063         return size
1064 }
1065 func (m *BierTableAddDel) Marshal(b []byte) ([]byte, error) {
1066         if b == nil {
1067                 b = make([]byte, m.Size())
1068         }
1069         buf := codec.NewBuffer(b)
1070         buf.EncodeUint8(m.BtTblID.BtSet)
1071         buf.EncodeUint8(m.BtTblID.BtSubDomain)
1072         buf.EncodeUint8(m.BtTblID.BtHdrLenID)
1073         buf.EncodeUint32(m.BtLabel)
1074         buf.EncodeBool(m.BtIsAdd)
1075         return buf.Bytes(), nil
1076 }
1077 func (m *BierTableAddDel) Unmarshal(b []byte) error {
1078         buf := codec.NewBuffer(b)
1079         m.BtTblID.BtSet = buf.DecodeUint8()
1080         m.BtTblID.BtSubDomain = buf.DecodeUint8()
1081         m.BtTblID.BtHdrLenID = buf.DecodeUint8()
1082         m.BtLabel = buf.DecodeUint32()
1083         m.BtIsAdd = buf.DecodeBool()
1084         return nil
1085 }
1086
1087 // BierTableAddDelReply defines message 'bier_table_add_del_reply'.
1088 type BierTableAddDelReply struct {
1089         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1090 }
1091
1092 func (m *BierTableAddDelReply) Reset()               { *m = BierTableAddDelReply{} }
1093 func (*BierTableAddDelReply) GetMessageName() string { return "bier_table_add_del_reply" }
1094 func (*BierTableAddDelReply) GetCrcString() string   { return "e8d4e804" }
1095 func (*BierTableAddDelReply) GetMessageType() api.MessageType {
1096         return api.ReplyMessage
1097 }
1098
1099 func (m *BierTableAddDelReply) Size() (size int) {
1100         if m == nil {
1101                 return 0
1102         }
1103         size += 4 // m.Retval
1104         return size
1105 }
1106 func (m *BierTableAddDelReply) Marshal(b []byte) ([]byte, error) {
1107         if b == nil {
1108                 b = make([]byte, m.Size())
1109         }
1110         buf := codec.NewBuffer(b)
1111         buf.EncodeInt32(m.Retval)
1112         return buf.Bytes(), nil
1113 }
1114 func (m *BierTableAddDelReply) Unmarshal(b []byte) error {
1115         buf := codec.NewBuffer(b)
1116         m.Retval = buf.DecodeInt32()
1117         return nil
1118 }
1119
1120 // BierTableDetails defines message 'bier_table_details'.
1121 type BierTableDetails struct {
1122         BtLabel uint32      `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
1123         BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
1124 }
1125
1126 func (m *BierTableDetails) Reset()               { *m = BierTableDetails{} }
1127 func (*BierTableDetails) GetMessageName() string { return "bier_table_details" }
1128 func (*BierTableDetails) GetCrcString() string   { return "fc44a9dd" }
1129 func (*BierTableDetails) GetMessageType() api.MessageType {
1130         return api.ReplyMessage
1131 }
1132
1133 func (m *BierTableDetails) Size() (size int) {
1134         if m == nil {
1135                 return 0
1136         }
1137         size += 4 // m.BtLabel
1138         size += 1 // m.BtTblID.BtSet
1139         size += 1 // m.BtTblID.BtSubDomain
1140         size += 1 // m.BtTblID.BtHdrLenID
1141         return size
1142 }
1143 func (m *BierTableDetails) Marshal(b []byte) ([]byte, error) {
1144         if b == nil {
1145                 b = make([]byte, m.Size())
1146         }
1147         buf := codec.NewBuffer(b)
1148         buf.EncodeUint32(m.BtLabel)
1149         buf.EncodeUint8(m.BtTblID.BtSet)
1150         buf.EncodeUint8(m.BtTblID.BtSubDomain)
1151         buf.EncodeUint8(m.BtTblID.BtHdrLenID)
1152         return buf.Bytes(), nil
1153 }
1154 func (m *BierTableDetails) Unmarshal(b []byte) error {
1155         buf := codec.NewBuffer(b)
1156         m.BtLabel = buf.DecodeUint32()
1157         m.BtTblID.BtSet = buf.DecodeUint8()
1158         m.BtTblID.BtSubDomain = buf.DecodeUint8()
1159         m.BtTblID.BtHdrLenID = buf.DecodeUint8()
1160         return nil
1161 }
1162
1163 // BierTableDump defines message 'bier_table_dump'.
1164 type BierTableDump struct{}
1165
1166 func (m *BierTableDump) Reset()               { *m = BierTableDump{} }
1167 func (*BierTableDump) GetMessageName() string { return "bier_table_dump" }
1168 func (*BierTableDump) GetCrcString() string   { return "51077d14" }
1169 func (*BierTableDump) GetMessageType() api.MessageType {
1170         return api.RequestMessage
1171 }
1172
1173 func (m *BierTableDump) Size() (size int) {
1174         if m == nil {
1175                 return 0
1176         }
1177         return size
1178 }
1179 func (m *BierTableDump) Marshal(b []byte) ([]byte, error) {
1180         if b == nil {
1181                 b = make([]byte, m.Size())
1182         }
1183         buf := codec.NewBuffer(b)
1184         return buf.Bytes(), nil
1185 }
1186 func (m *BierTableDump) Unmarshal(b []byte) error {
1187         return nil
1188 }
1189
1190 func init() { file_bier_binapi_init() }
1191 func file_bier_binapi_init() {
1192         api.RegisterMessage((*BierDispEntryAddDel)(nil), "bier_disp_entry_add_del_648323eb")
1193         api.RegisterMessage((*BierDispEntryAddDelReply)(nil), "bier_disp_entry_add_del_reply_e8d4e804")
1194         api.RegisterMessage((*BierDispEntryDetails)(nil), "bier_disp_entry_details_e5b039a9")
1195         api.RegisterMessage((*BierDispEntryDump)(nil), "bier_disp_entry_dump_b5fa54ad")
1196         api.RegisterMessage((*BierDispTableAddDel)(nil), "bier_disp_table_add_del_889657ac")
1197         api.RegisterMessage((*BierDispTableAddDelReply)(nil), "bier_disp_table_add_del_reply_e8d4e804")
1198         api.RegisterMessage((*BierDispTableDetails)(nil), "bier_disp_table_details_d27942c0")
1199         api.RegisterMessage((*BierDispTableDump)(nil), "bier_disp_table_dump_51077d14")
1200         api.RegisterMessage((*BierImpAdd)(nil), "bier_imp_add_3856dc3d")
1201         api.RegisterMessage((*BierImpAddReply)(nil), "bier_imp_add_reply_d49c5793")
1202         api.RegisterMessage((*BierImpDel)(nil), "bier_imp_del_7d45edf6")
1203         api.RegisterMessage((*BierImpDelReply)(nil), "bier_imp_del_reply_e8d4e804")
1204         api.RegisterMessage((*BierImpDetails)(nil), "bier_imp_details_b76192df")
1205         api.RegisterMessage((*BierImpDump)(nil), "bier_imp_dump_51077d14")
1206         api.RegisterMessage((*BierRouteAddDel)(nil), "bier_route_add_del_f29edca0")
1207         api.RegisterMessage((*BierRouteAddDelReply)(nil), "bier_route_add_del_reply_e8d4e804")
1208         api.RegisterMessage((*BierRouteDetails)(nil), "bier_route_details_39ee6a56")
1209         api.RegisterMessage((*BierRouteDump)(nil), "bier_route_dump_38339846")
1210         api.RegisterMessage((*BierTableAddDel)(nil), "bier_table_add_del_35e59209")
1211         api.RegisterMessage((*BierTableAddDelReply)(nil), "bier_table_add_del_reply_e8d4e804")
1212         api.RegisterMessage((*BierTableDetails)(nil), "bier_table_details_fc44a9dd")
1213         api.RegisterMessage((*BierTableDump)(nil), "bier_table_dump_51077d14")
1214 }
1215
1216 // Messages returns list of all messages in this module.
1217 func AllMessages() []api.Message {
1218         return []api.Message{
1219                 (*BierDispEntryAddDel)(nil),
1220                 (*BierDispEntryAddDelReply)(nil),
1221                 (*BierDispEntryDetails)(nil),
1222                 (*BierDispEntryDump)(nil),
1223                 (*BierDispTableAddDel)(nil),
1224                 (*BierDispTableAddDelReply)(nil),
1225                 (*BierDispTableDetails)(nil),
1226                 (*BierDispTableDump)(nil),
1227                 (*BierImpAdd)(nil),
1228                 (*BierImpAddReply)(nil),
1229                 (*BierImpDel)(nil),
1230                 (*BierImpDelReply)(nil),
1231                 (*BierImpDetails)(nil),
1232                 (*BierImpDump)(nil),
1233                 (*BierRouteAddDel)(nil),
1234                 (*BierRouteAddDelReply)(nil),
1235                 (*BierRouteDetails)(nil),
1236                 (*BierRouteDump)(nil),
1237                 (*BierTableAddDel)(nil),
1238                 (*BierTableAddDelReply)(nil),
1239                 (*BierTableDetails)(nil),
1240                 (*BierTableDump)(nil),
1241         }
1242 }