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