1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
5 // source: /usr/share/vpp/api/core/bier.api.json
7 // Package bier contains generated bindings for API file bier.api.
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"
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
31 VersionCrc = 0x8d1cd497
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"`
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"`
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"`
59 func (m *BierDispEntryAddDel) Reset() { *m = BierDispEntryAddDel{} }
60 func (*BierDispEntryAddDel) GetMessageName() string { return "bier_disp_entry_add_del" }
61 func (*BierDispEntryAddDel) GetCrcString() string { return "9eb80cb4" }
62 func (*BierDispEntryAddDel) GetMessageType() api.MessageType {
63 return api.RequestMessage
66 func (m *BierDispEntryAddDel) Size() (size int) {
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
78 if j1 < len(m.BdePaths) {
81 size += 4 // s1.SwIfIndex
82 size += 4 // s1.TableID
84 size += 1 // s1.Weight
85 size += 1 // s1.Preference
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
103 func (m *BierDispEntryAddDel) Marshal(b []byte) ([]byte, error) {
105 b = make([]byte, m.Size())
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) {
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)
138 return buf.Bytes(), nil
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()
172 // BierDispEntryAddDelReply defines message 'bier_disp_entry_add_del_reply'.
173 type BierDispEntryAddDelReply struct {
174 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
184 func (m *BierDispEntryAddDelReply) Size() (size int) {
188 size += 4 // m.Retval
191 func (m *BierDispEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
193 b = make([]byte, m.Size())
195 buf := codec.NewBuffer(b)
196 buf.EncodeInt32(m.Retval)
197 return buf.Bytes(), nil
199 func (m *BierDispEntryAddDelReply) Unmarshal(b []byte) error {
200 buf := codec.NewBuffer(b)
201 m.Retval = buf.DecodeInt32()
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"`
215 func (m *BierDispEntryDetails) Reset() { *m = BierDispEntryDetails{} }
216 func (*BierDispEntryDetails) GetMessageName() string { return "bier_disp_entry_details" }
217 func (*BierDispEntryDetails) GetCrcString() string { return "84c218f1" }
218 func (*BierDispEntryDetails) GetMessageType() api.MessageType {
219 return api.ReplyMessage
222 func (m *BierDispEntryDetails) Size() (size int) {
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
234 if j1 < len(m.BdePaths) {
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
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
259 func (m *BierDispEntryDetails) Marshal(b []byte) ([]byte, error) {
261 b = make([]byte, m.Size())
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) {
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)
294 return buf.Bytes(), nil
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()
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"`
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
340 func (m *BierDispEntryDump) Size() (size int) {
344 size += 4 // m.BdeTblID
347 func (m *BierDispEntryDump) Marshal(b []byte) ([]byte, error) {
349 b = make([]byte, m.Size())
351 buf := codec.NewBuffer(b)
352 buf.EncodeUint32(m.BdeTblID)
353 return buf.Bytes(), nil
355 func (m *BierDispEntryDump) Unmarshal(b []byte) error {
356 buf := codec.NewBuffer(b)
357 m.BdeTblID = buf.DecodeUint32()
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"`
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
374 func (m *BierDispTableAddDel) Size() (size int) {
378 size += 4 // m.BdtTblID
379 size += 1 // m.BdtIsAdd
382 func (m *BierDispTableAddDel) Marshal(b []byte) ([]byte, error) {
384 b = make([]byte, m.Size())
386 buf := codec.NewBuffer(b)
387 buf.EncodeUint32(m.BdtTblID)
388 buf.EncodeBool(m.BdtIsAdd)
389 return buf.Bytes(), nil
391 func (m *BierDispTableAddDel) Unmarshal(b []byte) error {
392 buf := codec.NewBuffer(b)
393 m.BdtTblID = buf.DecodeUint32()
394 m.BdtIsAdd = buf.DecodeBool()
398 // BierDispTableAddDelReply defines message 'bier_disp_table_add_del_reply'.
399 type BierDispTableAddDelReply struct {
400 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
410 func (m *BierDispTableAddDelReply) Size() (size int) {
414 size += 4 // m.Retval
417 func (m *BierDispTableAddDelReply) Marshal(b []byte) ([]byte, error) {
419 b = make([]byte, m.Size())
421 buf := codec.NewBuffer(b)
422 buf.EncodeInt32(m.Retval)
423 return buf.Bytes(), nil
425 func (m *BierDispTableAddDelReply) Unmarshal(b []byte) error {
426 buf := codec.NewBuffer(b)
427 m.Retval = buf.DecodeInt32()
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"`
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
443 func (m *BierDispTableDetails) Size() (size int) {
447 size += 4 // m.BdtTblID
450 func (m *BierDispTableDetails) Marshal(b []byte) ([]byte, error) {
452 b = make([]byte, m.Size())
454 buf := codec.NewBuffer(b)
455 buf.EncodeUint32(m.BdtTblID)
456 return buf.Bytes(), nil
458 func (m *BierDispTableDetails) Unmarshal(b []byte) error {
459 buf := codec.NewBuffer(b)
460 m.BdtTblID = buf.DecodeUint32()
464 // BierDispTableDump defines message 'bier_disp_table_dump'.
465 type BierDispTableDump struct{}
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
474 func (m *BierDispTableDump) Size() (size int) {
480 func (m *BierDispTableDump) Marshal(b []byte) ([]byte, error) {
482 b = make([]byte, m.Size())
484 buf := codec.NewBuffer(b)
485 return buf.Bytes(), nil
487 func (m *BierDispTableDump) Unmarshal(b []byte) error {
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"`
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
506 func (m *BierImpAdd) Size() (size int) {
510 size += 1 // m.BiTblID.BtSet
511 size += 1 // m.BiTblID.BtSubDomain
512 size += 1 // m.BiTblID.BtHdrLenID
514 size += 1 // m.BiNBytes
515 size += 1 * len(m.BiBytes) // m.BiBytes
518 func (m *BierImpAdd) Marshal(b []byte) ([]byte, error) {
520 b = make([]byte, m.Size())
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
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)))
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"`
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
556 func (m *BierImpAddReply) Size() (size int) {
560 size += 4 // m.Retval
561 size += 4 // m.BiIndex
564 func (m *BierImpAddReply) Marshal(b []byte) ([]byte, error) {
566 b = make([]byte, m.Size())
568 buf := codec.NewBuffer(b)
569 buf.EncodeInt32(m.Retval)
570 buf.EncodeUint32(m.BiIndex)
571 return buf.Bytes(), nil
573 func (m *BierImpAddReply) Unmarshal(b []byte) error {
574 buf := codec.NewBuffer(b)
575 m.Retval = buf.DecodeInt32()
576 m.BiIndex = buf.DecodeUint32()
580 // BierImpDel defines message 'bier_imp_del'.
581 type BierImpDel struct {
582 BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
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
592 func (m *BierImpDel) Size() (size int) {
596 size += 4 // m.BiIndex
599 func (m *BierImpDel) Marshal(b []byte) ([]byte, error) {
601 b = make([]byte, m.Size())
603 buf := codec.NewBuffer(b)
604 buf.EncodeUint32(m.BiIndex)
605 return buf.Bytes(), nil
607 func (m *BierImpDel) Unmarshal(b []byte) error {
608 buf := codec.NewBuffer(b)
609 m.BiIndex = buf.DecodeUint32()
613 // BierImpDelReply defines message 'bier_imp_del_reply'.
614 type BierImpDelReply struct {
615 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
625 func (m *BierImpDelReply) Size() (size int) {
629 size += 4 // m.Retval
632 func (m *BierImpDelReply) Marshal(b []byte) ([]byte, error) {
634 b = make([]byte, m.Size())
636 buf := codec.NewBuffer(b)
637 buf.EncodeInt32(m.Retval)
638 return buf.Bytes(), nil
640 func (m *BierImpDelReply) Unmarshal(b []byte) error {
641 buf := codec.NewBuffer(b)
642 m.Retval = buf.DecodeInt32()
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"`
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
661 func (m *BierImpDetails) Size() (size int) {
665 size += 1 // m.BiTblID.BtSet
666 size += 1 // m.BiTblID.BtSubDomain
667 size += 1 // m.BiTblID.BtHdrLenID
669 size += 1 // m.BiNBytes
670 size += 1 * len(m.BiBytes) // m.BiBytes
673 func (m *BierImpDetails) Marshal(b []byte) ([]byte, error) {
675 b = make([]byte, m.Size())
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
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)))
698 // BierImpDump defines message 'bier_imp_dump'.
699 type BierImpDump struct{}
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
708 func (m *BierImpDump) Size() (size int) {
714 func (m *BierImpDump) Marshal(b []byte) ([]byte, error) {
716 b = make([]byte, m.Size())
718 buf := codec.NewBuffer(b)
719 return buf.Bytes(), nil
721 func (m *BierImpDump) Unmarshal(b []byte) error {
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"`
732 func (m *BierRouteAddDel) Reset() { *m = BierRouteAddDel{} }
733 func (*BierRouteAddDel) GetMessageName() string { return "bier_route_add_del" }
734 func (*BierRouteAddDel) GetCrcString() string { return "fd02f3ea" }
735 func (*BierRouteAddDel) GetMessageType() api.MessageType {
736 return api.RequestMessage
739 func (m *BierRouteAddDel) Size() (size int) {
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
753 if j2 < len(m.BrRoute.BrPaths) {
754 s2 = m.BrRoute.BrPaths[j2]
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
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
778 func (m *BierRouteAddDel) Marshal(b []byte) ([]byte, error) {
780 b = make([]byte, m.Size())
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]
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)
815 return buf.Bytes(), nil
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()
851 // BierRouteAddDelReply defines message 'bier_route_add_del_reply'.
852 type BierRouteAddDelReply struct {
853 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
863 func (m *BierRouteAddDelReply) Size() (size int) {
867 size += 4 // m.Retval
870 func (m *BierRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
872 b = make([]byte, m.Size())
874 buf := codec.NewBuffer(b)
875 buf.EncodeInt32(m.Retval)
876 return buf.Bytes(), nil
878 func (m *BierRouteAddDelReply) Unmarshal(b []byte) error {
879 buf := codec.NewBuffer(b)
880 m.Retval = buf.DecodeInt32()
884 // BierRouteDetails defines message 'bier_route_details'.
885 type BierRouteDetails struct {
886 BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
889 func (m *BierRouteDetails) Reset() { *m = BierRouteDetails{} }
890 func (*BierRouteDetails) GetMessageName() string { return "bier_route_details" }
891 func (*BierRouteDetails) GetCrcString() string { return "4008caee" }
892 func (*BierRouteDetails) GetMessageType() api.MessageType {
893 return api.ReplyMessage
896 func (m *BierRouteDetails) Size() (size int) {
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
908 if j2 < len(m.BrRoute.BrPaths) {
909 s2 = m.BrRoute.BrPaths[j2]
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
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
933 func (m *BierRouteDetails) Marshal(b []byte) ([]byte, error) {
935 b = make([]byte, m.Size())
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]
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)
968 return buf.Bytes(), nil
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()
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"`
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
1014 func (m *BierRouteDump) Size() (size int) {
1018 size += 1 // m.BrTblID.BtSet
1019 size += 1 // m.BrTblID.BtSubDomain
1020 size += 1 // m.BrTblID.BtHdrLenID
1023 func (m *BierRouteDump) Marshal(b []byte) ([]byte, error) {
1025 b = make([]byte, m.Size())
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
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()
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"`
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
1055 func (m *BierTableAddDel) Size() (size int) {
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
1066 func (m *BierTableAddDel) Marshal(b []byte) ([]byte, error) {
1068 b = make([]byte, m.Size())
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
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()
1088 // BierTableAddDelReply defines message 'bier_table_add_del_reply'.
1089 type BierTableAddDelReply struct {
1090 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
1100 func (m *BierTableAddDelReply) Size() (size int) {
1104 size += 4 // m.Retval
1107 func (m *BierTableAddDelReply) Marshal(b []byte) ([]byte, error) {
1109 b = make([]byte, m.Size())
1111 buf := codec.NewBuffer(b)
1112 buf.EncodeInt32(m.Retval)
1113 return buf.Bytes(), nil
1115 func (m *BierTableAddDelReply) Unmarshal(b []byte) error {
1116 buf := codec.NewBuffer(b)
1117 m.Retval = buf.DecodeInt32()
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"`
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
1134 func (m *BierTableDetails) Size() (size int) {
1138 size += 4 // m.BtLabel
1139 size += 1 // m.BtTblID.BtSet
1140 size += 1 // m.BtTblID.BtSubDomain
1141 size += 1 // m.BtTblID.BtHdrLenID
1144 func (m *BierTableDetails) Marshal(b []byte) ([]byte, error) {
1146 b = make([]byte, m.Size())
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
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()
1164 // BierTableDump defines message 'bier_table_dump'.
1165 type BierTableDump struct{}
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
1174 func (m *BierTableDump) Size() (size int) {
1180 func (m *BierTableDump) Marshal(b []byte) ([]byte, error) {
1182 b = make([]byte, m.Size())
1184 buf := codec.NewBuffer(b)
1185 return buf.Bytes(), nil
1187 func (m *BierTableDump) Unmarshal(b []byte) error {
1191 func init() { file_bier_binapi_init() }
1192 func file_bier_binapi_init() {
1193 api.RegisterMessage((*BierDispEntryAddDel)(nil), "bier_disp_entry_add_del_9eb80cb4")
1194 api.RegisterMessage((*BierDispEntryAddDelReply)(nil), "bier_disp_entry_add_del_reply_e8d4e804")
1195 api.RegisterMessage((*BierDispEntryDetails)(nil), "bier_disp_entry_details_84c218f1")
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_fd02f3ea")
1208 api.RegisterMessage((*BierRouteAddDelReply)(nil), "bier_route_add_del_reply_e8d4e804")
1209 api.RegisterMessage((*BierRouteDetails)(nil), "bier_route_details_4008caee")
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")
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),
1229 (*BierImpAddReply)(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),