1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package bier contains generated bindings for API file bier.api.
15 api "git.fd.io/govpp.git/api"
16 fib_types "git.fd.io/govpp.git/binapi/fib_types"
17 _ "git.fd.io/govpp.git/binapi/ip_types"
18 codec "git.fd.io/govpp.git/codec"
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
30 VersionCrc = 0x9196a2d4
33 // BierRoute defines type 'bier_route'.
34 type BierRoute struct {
35 BrBp uint32 `binapi:"u32,name=br_bp" json:"br_bp,omitempty"`
36 BrTblID BierTableID `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
37 BrNPaths uint8 `binapi:"u8,name=br_n_paths" json:"-"`
38 BrPaths []fib_types.FibPath `binapi:"fib_path[br_n_paths],name=br_paths" json:"br_paths,omitempty"`
41 // BierTableID defines type 'bier_table_id'.
42 type BierTableID struct {
43 BtSet uint8 `binapi:"u8,name=bt_set" json:"bt_set,omitempty"`
44 BtSubDomain uint8 `binapi:"u8,name=bt_sub_domain" json:"bt_sub_domain,omitempty"`
45 BtHdrLenID uint8 `binapi:"u8,name=bt_hdr_len_id" json:"bt_hdr_len_id,omitempty"`
48 // BierDispEntryAddDel defines message 'bier_disp_entry_add_del'.
49 type BierDispEntryAddDel struct {
50 BdeBp uint16 `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
51 BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
52 BdeIsAdd bool `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
53 BdePayloadProto uint8 `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
54 BdeNPaths uint8 `binapi:"u8,name=bde_n_paths" json:"-"`
55 BdePaths []fib_types.FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
58 func (m *BierDispEntryAddDel) Reset() { *m = BierDispEntryAddDel{} }
59 func (*BierDispEntryAddDel) GetMessageName() string { return "bier_disp_entry_add_del" }
60 func (*BierDispEntryAddDel) GetCrcString() string { return "648323eb" }
61 func (*BierDispEntryAddDel) GetMessageType() api.MessageType {
62 return api.RequestMessage
65 func (m *BierDispEntryAddDel) Size() (size int) {
70 size += 4 // m.BdeTblID
71 size += 1 // m.BdeIsAdd
72 size += 1 // m.BdePayloadProto
73 size += 1 // m.BdeNPaths
74 for j1 := 0; j1 < len(m.BdePaths); j1++ {
75 var s1 fib_types.FibPath
77 if j1 < len(m.BdePaths) {
80 size += 4 // s1.SwIfIndex
81 size += 4 // s1.TableID
83 size += 1 // s1.Weight
84 size += 1 // s1.Preference
88 size += 1 * 16 // s1.Nh.Address
89 size += 4 // s1.Nh.ViaLabel
90 size += 4 // s1.Nh.ObjID
91 size += 4 // s1.Nh.ClassifyTableIndex
92 size += 1 // s1.NLabels
93 for j2 := 0; j2 < 16; j2++ {
94 size += 1 // s1.LabelStack[j2].IsUniform
95 size += 4 // s1.LabelStack[j2].Label
96 size += 1 // s1.LabelStack[j2].TTL
97 size += 1 // s1.LabelStack[j2].Exp
102 func (m *BierDispEntryAddDel) Marshal(b []byte) ([]byte, error) {
104 b = make([]byte, m.Size())
106 buf := codec.NewBuffer(b)
107 buf.EncodeUint16(m.BdeBp)
108 buf.EncodeUint32(m.BdeTblID)
109 buf.EncodeBool(m.BdeIsAdd)
110 buf.EncodeUint8(m.BdePayloadProto)
111 buf.EncodeUint8(uint8(len(m.BdePaths)))
112 for j0 := 0; j0 < len(m.BdePaths); j0++ {
113 var v0 fib_types.FibPath // BdePaths
114 if j0 < len(m.BdePaths) {
117 buf.EncodeUint32(v0.SwIfIndex)
118 buf.EncodeUint32(v0.TableID)
119 buf.EncodeUint32(v0.RpfID)
120 buf.EncodeUint8(v0.Weight)
121 buf.EncodeUint8(v0.Preference)
122 buf.EncodeUint32(uint32(v0.Type))
123 buf.EncodeUint32(uint32(v0.Flags))
124 buf.EncodeUint32(uint32(v0.Proto))
125 buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16)
126 buf.EncodeUint32(v0.Nh.ViaLabel)
127 buf.EncodeUint32(v0.Nh.ObjID)
128 buf.EncodeUint32(v0.Nh.ClassifyTableIndex)
129 buf.EncodeUint8(v0.NLabels)
130 for j1 := 0; j1 < 16; j1++ {
131 buf.EncodeUint8(v0.LabelStack[j1].IsUniform)
132 buf.EncodeUint32(v0.LabelStack[j1].Label)
133 buf.EncodeUint8(v0.LabelStack[j1].TTL)
134 buf.EncodeUint8(v0.LabelStack[j1].Exp)
137 return buf.Bytes(), nil
139 func (m *BierDispEntryAddDel) Unmarshal(b []byte) error {
140 buf := codec.NewBuffer(b)
141 m.BdeBp = buf.DecodeUint16()
142 m.BdeTblID = buf.DecodeUint32()
143 m.BdeIsAdd = buf.DecodeBool()
144 m.BdePayloadProto = buf.DecodeUint8()
145 m.BdeNPaths = buf.DecodeUint8()
146 m.BdePaths = make([]fib_types.FibPath, m.BdeNPaths)
147 for j0 := 0; j0 < len(m.BdePaths); j0++ {
148 m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
149 m.BdePaths[j0].TableID = buf.DecodeUint32()
150 m.BdePaths[j0].RpfID = buf.DecodeUint32()
151 m.BdePaths[j0].Weight = buf.DecodeUint8()
152 m.BdePaths[j0].Preference = buf.DecodeUint8()
153 m.BdePaths[j0].Type = fib_types.FibPathType(buf.DecodeUint32())
154 m.BdePaths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
155 m.BdePaths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
156 copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
157 m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
158 m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
159 m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
160 m.BdePaths[j0].NLabels = buf.DecodeUint8()
161 for j1 := 0; j1 < 16; j1++ {
162 m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
163 m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
164 m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
165 m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
171 // BierDispEntryAddDelReply defines message 'bier_disp_entry_add_del_reply'.
172 type BierDispEntryAddDelReply struct {
173 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
176 func (m *BierDispEntryAddDelReply) Reset() { *m = BierDispEntryAddDelReply{} }
177 func (*BierDispEntryAddDelReply) GetMessageName() string { return "bier_disp_entry_add_del_reply" }
178 func (*BierDispEntryAddDelReply) GetCrcString() string { return "e8d4e804" }
179 func (*BierDispEntryAddDelReply) GetMessageType() api.MessageType {
180 return api.ReplyMessage
183 func (m *BierDispEntryAddDelReply) Size() (size int) {
187 size += 4 // m.Retval
190 func (m *BierDispEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
192 b = make([]byte, m.Size())
194 buf := codec.NewBuffer(b)
195 buf.EncodeInt32(m.Retval)
196 return buf.Bytes(), nil
198 func (m *BierDispEntryAddDelReply) Unmarshal(b []byte) error {
199 buf := codec.NewBuffer(b)
200 m.Retval = buf.DecodeInt32()
204 // BierDispEntryDetails defines message 'bier_disp_entry_details'.
205 type BierDispEntryDetails struct {
206 BdeBp uint16 `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
207 BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
208 BdeIsAdd bool `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
209 BdePayloadProto uint8 `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
210 BdeNPaths uint8 `binapi:"u8,name=bde_n_paths" json:"-"`
211 BdePaths []fib_types.FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
214 func (m *BierDispEntryDetails) Reset() { *m = BierDispEntryDetails{} }
215 func (*BierDispEntryDetails) GetMessageName() string { return "bier_disp_entry_details" }
216 func (*BierDispEntryDetails) GetCrcString() string { return "e5b039a9" }
217 func (*BierDispEntryDetails) GetMessageType() api.MessageType {
218 return api.ReplyMessage
221 func (m *BierDispEntryDetails) Size() (size int) {
226 size += 4 // m.BdeTblID
227 size += 1 // m.BdeIsAdd
228 size += 1 // m.BdePayloadProto
229 size += 1 // m.BdeNPaths
230 for j1 := 0; j1 < len(m.BdePaths); j1++ {
231 var s1 fib_types.FibPath
233 if j1 < len(m.BdePaths) {
236 size += 4 // s1.SwIfIndex
237 size += 4 // s1.TableID
238 size += 4 // s1.RpfID
239 size += 1 // s1.Weight
240 size += 1 // s1.Preference
242 size += 4 // s1.Flags
243 size += 4 // s1.Proto
244 size += 1 * 16 // s1.Nh.Address
245 size += 4 // s1.Nh.ViaLabel
246 size += 4 // s1.Nh.ObjID
247 size += 4 // s1.Nh.ClassifyTableIndex
248 size += 1 // s1.NLabels
249 for j2 := 0; j2 < 16; j2++ {
250 size += 1 // s1.LabelStack[j2].IsUniform
251 size += 4 // s1.LabelStack[j2].Label
252 size += 1 // s1.LabelStack[j2].TTL
253 size += 1 // s1.LabelStack[j2].Exp
258 func (m *BierDispEntryDetails) Marshal(b []byte) ([]byte, error) {
260 b = make([]byte, m.Size())
262 buf := codec.NewBuffer(b)
263 buf.EncodeUint16(m.BdeBp)
264 buf.EncodeUint32(m.BdeTblID)
265 buf.EncodeBool(m.BdeIsAdd)
266 buf.EncodeUint8(m.BdePayloadProto)
267 buf.EncodeUint8(uint8(len(m.BdePaths)))
268 for j0 := 0; j0 < len(m.BdePaths); j0++ {
269 var v0 fib_types.FibPath // BdePaths
270 if j0 < len(m.BdePaths) {
273 buf.EncodeUint32(v0.SwIfIndex)
274 buf.EncodeUint32(v0.TableID)
275 buf.EncodeUint32(v0.RpfID)
276 buf.EncodeUint8(v0.Weight)
277 buf.EncodeUint8(v0.Preference)
278 buf.EncodeUint32(uint32(v0.Type))
279 buf.EncodeUint32(uint32(v0.Flags))
280 buf.EncodeUint32(uint32(v0.Proto))
281 buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16)
282 buf.EncodeUint32(v0.Nh.ViaLabel)
283 buf.EncodeUint32(v0.Nh.ObjID)
284 buf.EncodeUint32(v0.Nh.ClassifyTableIndex)
285 buf.EncodeUint8(v0.NLabels)
286 for j1 := 0; j1 < 16; j1++ {
287 buf.EncodeUint8(v0.LabelStack[j1].IsUniform)
288 buf.EncodeUint32(v0.LabelStack[j1].Label)
289 buf.EncodeUint8(v0.LabelStack[j1].TTL)
290 buf.EncodeUint8(v0.LabelStack[j1].Exp)
293 return buf.Bytes(), nil
295 func (m *BierDispEntryDetails) Unmarshal(b []byte) error {
296 buf := codec.NewBuffer(b)
297 m.BdeBp = buf.DecodeUint16()
298 m.BdeTblID = buf.DecodeUint32()
299 m.BdeIsAdd = buf.DecodeBool()
300 m.BdePayloadProto = buf.DecodeUint8()
301 m.BdeNPaths = buf.DecodeUint8()
302 m.BdePaths = make([]fib_types.FibPath, m.BdeNPaths)
303 for j0 := 0; j0 < len(m.BdePaths); j0++ {
304 m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
305 m.BdePaths[j0].TableID = buf.DecodeUint32()
306 m.BdePaths[j0].RpfID = buf.DecodeUint32()
307 m.BdePaths[j0].Weight = buf.DecodeUint8()
308 m.BdePaths[j0].Preference = buf.DecodeUint8()
309 m.BdePaths[j0].Type = fib_types.FibPathType(buf.DecodeUint32())
310 m.BdePaths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
311 m.BdePaths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
312 copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
313 m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
314 m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
315 m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
316 m.BdePaths[j0].NLabels = buf.DecodeUint8()
317 for j1 := 0; j1 < 16; j1++ {
318 m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
319 m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
320 m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
321 m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
327 // BierDispEntryDump defines message 'bier_disp_entry_dump'.
328 type BierDispEntryDump struct {
329 BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
332 func (m *BierDispEntryDump) Reset() { *m = BierDispEntryDump{} }
333 func (*BierDispEntryDump) GetMessageName() string { return "bier_disp_entry_dump" }
334 func (*BierDispEntryDump) GetCrcString() string { return "b5fa54ad" }
335 func (*BierDispEntryDump) GetMessageType() api.MessageType {
336 return api.RequestMessage
339 func (m *BierDispEntryDump) Size() (size int) {
343 size += 4 // m.BdeTblID
346 func (m *BierDispEntryDump) Marshal(b []byte) ([]byte, error) {
348 b = make([]byte, m.Size())
350 buf := codec.NewBuffer(b)
351 buf.EncodeUint32(m.BdeTblID)
352 return buf.Bytes(), nil
354 func (m *BierDispEntryDump) Unmarshal(b []byte) error {
355 buf := codec.NewBuffer(b)
356 m.BdeTblID = buf.DecodeUint32()
360 // BierDispTableAddDel defines message 'bier_disp_table_add_del'.
361 type BierDispTableAddDel struct {
362 BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
363 BdtIsAdd bool `binapi:"bool,name=bdt_is_add" json:"bdt_is_add,omitempty"`
366 func (m *BierDispTableAddDel) Reset() { *m = BierDispTableAddDel{} }
367 func (*BierDispTableAddDel) GetMessageName() string { return "bier_disp_table_add_del" }
368 func (*BierDispTableAddDel) GetCrcString() string { return "889657ac" }
369 func (*BierDispTableAddDel) GetMessageType() api.MessageType {
370 return api.RequestMessage
373 func (m *BierDispTableAddDel) Size() (size int) {
377 size += 4 // m.BdtTblID
378 size += 1 // m.BdtIsAdd
381 func (m *BierDispTableAddDel) Marshal(b []byte) ([]byte, error) {
383 b = make([]byte, m.Size())
385 buf := codec.NewBuffer(b)
386 buf.EncodeUint32(m.BdtTblID)
387 buf.EncodeBool(m.BdtIsAdd)
388 return buf.Bytes(), nil
390 func (m *BierDispTableAddDel) Unmarshal(b []byte) error {
391 buf := codec.NewBuffer(b)
392 m.BdtTblID = buf.DecodeUint32()
393 m.BdtIsAdd = buf.DecodeBool()
397 // BierDispTableAddDelReply defines message 'bier_disp_table_add_del_reply'.
398 type BierDispTableAddDelReply struct {
399 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
402 func (m *BierDispTableAddDelReply) Reset() { *m = BierDispTableAddDelReply{} }
403 func (*BierDispTableAddDelReply) GetMessageName() string { return "bier_disp_table_add_del_reply" }
404 func (*BierDispTableAddDelReply) GetCrcString() string { return "e8d4e804" }
405 func (*BierDispTableAddDelReply) GetMessageType() api.MessageType {
406 return api.ReplyMessage
409 func (m *BierDispTableAddDelReply) Size() (size int) {
413 size += 4 // m.Retval
416 func (m *BierDispTableAddDelReply) Marshal(b []byte) ([]byte, error) {
418 b = make([]byte, m.Size())
420 buf := codec.NewBuffer(b)
421 buf.EncodeInt32(m.Retval)
422 return buf.Bytes(), nil
424 func (m *BierDispTableAddDelReply) Unmarshal(b []byte) error {
425 buf := codec.NewBuffer(b)
426 m.Retval = buf.DecodeInt32()
430 // BierDispTableDetails defines message 'bier_disp_table_details'.
431 type BierDispTableDetails struct {
432 BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
435 func (m *BierDispTableDetails) Reset() { *m = BierDispTableDetails{} }
436 func (*BierDispTableDetails) GetMessageName() string { return "bier_disp_table_details" }
437 func (*BierDispTableDetails) GetCrcString() string { return "d27942c0" }
438 func (*BierDispTableDetails) GetMessageType() api.MessageType {
439 return api.ReplyMessage
442 func (m *BierDispTableDetails) Size() (size int) {
446 size += 4 // m.BdtTblID
449 func (m *BierDispTableDetails) Marshal(b []byte) ([]byte, error) {
451 b = make([]byte, m.Size())
453 buf := codec.NewBuffer(b)
454 buf.EncodeUint32(m.BdtTblID)
455 return buf.Bytes(), nil
457 func (m *BierDispTableDetails) Unmarshal(b []byte) error {
458 buf := codec.NewBuffer(b)
459 m.BdtTblID = buf.DecodeUint32()
463 // BierDispTableDump defines message 'bier_disp_table_dump'.
464 type BierDispTableDump struct{}
466 func (m *BierDispTableDump) Reset() { *m = BierDispTableDump{} }
467 func (*BierDispTableDump) GetMessageName() string { return "bier_disp_table_dump" }
468 func (*BierDispTableDump) GetCrcString() string { return "51077d14" }
469 func (*BierDispTableDump) GetMessageType() api.MessageType {
470 return api.RequestMessage
473 func (m *BierDispTableDump) Size() (size int) {
479 func (m *BierDispTableDump) Marshal(b []byte) ([]byte, error) {
481 b = make([]byte, m.Size())
483 buf := codec.NewBuffer(b)
484 return buf.Bytes(), nil
486 func (m *BierDispTableDump) Unmarshal(b []byte) error {
490 // BierImpAdd defines message 'bier_imp_add'.
491 type BierImpAdd struct {
492 BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
493 BiSrc uint16 `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
494 BiNBytes uint8 `binapi:"u8,name=bi_n_bytes" json:"-"`
495 BiBytes []byte `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
498 func (m *BierImpAdd) Reset() { *m = BierImpAdd{} }
499 func (*BierImpAdd) GetMessageName() string { return "bier_imp_add" }
500 func (*BierImpAdd) GetCrcString() string { return "3856dc3d" }
501 func (*BierImpAdd) GetMessageType() api.MessageType {
502 return api.RequestMessage
505 func (m *BierImpAdd) Size() (size int) {
509 size += 1 // m.BiTblID.BtSet
510 size += 1 // m.BiTblID.BtSubDomain
511 size += 1 // m.BiTblID.BtHdrLenID
513 size += 1 // m.BiNBytes
514 size += 1 * len(m.BiBytes) // m.BiBytes
517 func (m *BierImpAdd) Marshal(b []byte) ([]byte, error) {
519 b = make([]byte, m.Size())
521 buf := codec.NewBuffer(b)
522 buf.EncodeUint8(m.BiTblID.BtSet)
523 buf.EncodeUint8(m.BiTblID.BtSubDomain)
524 buf.EncodeUint8(m.BiTblID.BtHdrLenID)
525 buf.EncodeUint16(m.BiSrc)
526 buf.EncodeUint8(uint8(len(m.BiBytes)))
527 buf.EncodeBytes(m.BiBytes, 0)
528 return buf.Bytes(), nil
530 func (m *BierImpAdd) Unmarshal(b []byte) error {
531 buf := codec.NewBuffer(b)
532 m.BiTblID.BtSet = buf.DecodeUint8()
533 m.BiTblID.BtSubDomain = buf.DecodeUint8()
534 m.BiTblID.BtHdrLenID = buf.DecodeUint8()
535 m.BiSrc = buf.DecodeUint16()
536 m.BiNBytes = buf.DecodeUint8()
537 m.BiBytes = make([]byte, m.BiNBytes)
538 copy(m.BiBytes, buf.DecodeBytes(len(m.BiBytes)))
542 // BierImpAddReply defines message 'bier_imp_add_reply'.
543 type BierImpAddReply struct {
544 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
545 BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
548 func (m *BierImpAddReply) Reset() { *m = BierImpAddReply{} }
549 func (*BierImpAddReply) GetMessageName() string { return "bier_imp_add_reply" }
550 func (*BierImpAddReply) GetCrcString() string { return "d49c5793" }
551 func (*BierImpAddReply) GetMessageType() api.MessageType {
552 return api.ReplyMessage
555 func (m *BierImpAddReply) Size() (size int) {
559 size += 4 // m.Retval
560 size += 4 // m.BiIndex
563 func (m *BierImpAddReply) Marshal(b []byte) ([]byte, error) {
565 b = make([]byte, m.Size())
567 buf := codec.NewBuffer(b)
568 buf.EncodeInt32(m.Retval)
569 buf.EncodeUint32(m.BiIndex)
570 return buf.Bytes(), nil
572 func (m *BierImpAddReply) Unmarshal(b []byte) error {
573 buf := codec.NewBuffer(b)
574 m.Retval = buf.DecodeInt32()
575 m.BiIndex = buf.DecodeUint32()
579 // BierImpDel defines message 'bier_imp_del'.
580 type BierImpDel struct {
581 BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
584 func (m *BierImpDel) Reset() { *m = BierImpDel{} }
585 func (*BierImpDel) GetMessageName() string { return "bier_imp_del" }
586 func (*BierImpDel) GetCrcString() string { return "7d45edf6" }
587 func (*BierImpDel) GetMessageType() api.MessageType {
588 return api.RequestMessage
591 func (m *BierImpDel) Size() (size int) {
595 size += 4 // m.BiIndex
598 func (m *BierImpDel) Marshal(b []byte) ([]byte, error) {
600 b = make([]byte, m.Size())
602 buf := codec.NewBuffer(b)
603 buf.EncodeUint32(m.BiIndex)
604 return buf.Bytes(), nil
606 func (m *BierImpDel) Unmarshal(b []byte) error {
607 buf := codec.NewBuffer(b)
608 m.BiIndex = buf.DecodeUint32()
612 // BierImpDelReply defines message 'bier_imp_del_reply'.
613 type BierImpDelReply struct {
614 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
617 func (m *BierImpDelReply) Reset() { *m = BierImpDelReply{} }
618 func (*BierImpDelReply) GetMessageName() string { return "bier_imp_del_reply" }
619 func (*BierImpDelReply) GetCrcString() string { return "e8d4e804" }
620 func (*BierImpDelReply) GetMessageType() api.MessageType {
621 return api.ReplyMessage
624 func (m *BierImpDelReply) Size() (size int) {
628 size += 4 // m.Retval
631 func (m *BierImpDelReply) Marshal(b []byte) ([]byte, error) {
633 b = make([]byte, m.Size())
635 buf := codec.NewBuffer(b)
636 buf.EncodeInt32(m.Retval)
637 return buf.Bytes(), nil
639 func (m *BierImpDelReply) Unmarshal(b []byte) error {
640 buf := codec.NewBuffer(b)
641 m.Retval = buf.DecodeInt32()
645 // BierImpDetails defines message 'bier_imp_details'.
646 type BierImpDetails struct {
647 BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
648 BiSrc uint16 `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
649 BiNBytes uint8 `binapi:"u8,name=bi_n_bytes" json:"-"`
650 BiBytes []byte `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
653 func (m *BierImpDetails) Reset() { *m = BierImpDetails{} }
654 func (*BierImpDetails) GetMessageName() string { return "bier_imp_details" }
655 func (*BierImpDetails) GetCrcString() string { return "b76192df" }
656 func (*BierImpDetails) GetMessageType() api.MessageType {
657 return api.ReplyMessage
660 func (m *BierImpDetails) Size() (size int) {
664 size += 1 // m.BiTblID.BtSet
665 size += 1 // m.BiTblID.BtSubDomain
666 size += 1 // m.BiTblID.BtHdrLenID
668 size += 1 // m.BiNBytes
669 size += 1 * len(m.BiBytes) // m.BiBytes
672 func (m *BierImpDetails) Marshal(b []byte) ([]byte, error) {
674 b = make([]byte, m.Size())
676 buf := codec.NewBuffer(b)
677 buf.EncodeUint8(m.BiTblID.BtSet)
678 buf.EncodeUint8(m.BiTblID.BtSubDomain)
679 buf.EncodeUint8(m.BiTblID.BtHdrLenID)
680 buf.EncodeUint16(m.BiSrc)
681 buf.EncodeUint8(uint8(len(m.BiBytes)))
682 buf.EncodeBytes(m.BiBytes, 0)
683 return buf.Bytes(), nil
685 func (m *BierImpDetails) Unmarshal(b []byte) error {
686 buf := codec.NewBuffer(b)
687 m.BiTblID.BtSet = buf.DecodeUint8()
688 m.BiTblID.BtSubDomain = buf.DecodeUint8()
689 m.BiTblID.BtHdrLenID = buf.DecodeUint8()
690 m.BiSrc = buf.DecodeUint16()
691 m.BiNBytes = buf.DecodeUint8()
692 m.BiBytes = make([]byte, m.BiNBytes)
693 copy(m.BiBytes, buf.DecodeBytes(len(m.BiBytes)))
697 // BierImpDump defines message 'bier_imp_dump'.
698 type BierImpDump struct{}
700 func (m *BierImpDump) Reset() { *m = BierImpDump{} }
701 func (*BierImpDump) GetMessageName() string { return "bier_imp_dump" }
702 func (*BierImpDump) GetCrcString() string { return "51077d14" }
703 func (*BierImpDump) GetMessageType() api.MessageType {
704 return api.RequestMessage
707 func (m *BierImpDump) Size() (size int) {
713 func (m *BierImpDump) Marshal(b []byte) ([]byte, error) {
715 b = make([]byte, m.Size())
717 buf := codec.NewBuffer(b)
718 return buf.Bytes(), nil
720 func (m *BierImpDump) Unmarshal(b []byte) error {
724 // BierRouteAddDel defines message 'bier_route_add_del'.
725 type BierRouteAddDel struct {
726 BrIsAdd bool `binapi:"bool,name=br_is_add" json:"br_is_add,omitempty"`
727 BrIsReplace bool `binapi:"bool,name=br_is_replace" json:"br_is_replace,omitempty"`
728 BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
731 func (m *BierRouteAddDel) Reset() { *m = BierRouteAddDel{} }
732 func (*BierRouteAddDel) GetMessageName() string { return "bier_route_add_del" }
733 func (*BierRouteAddDel) GetCrcString() string { return "f29edca0" }
734 func (*BierRouteAddDel) GetMessageType() api.MessageType {
735 return api.RequestMessage
738 func (m *BierRouteAddDel) Size() (size int) {
742 size += 1 // m.BrIsAdd
743 size += 1 // m.BrIsReplace
744 size += 4 // m.BrRoute.BrBp
745 size += 1 // m.BrRoute.BrTblID.BtSet
746 size += 1 // m.BrRoute.BrTblID.BtSubDomain
747 size += 1 // m.BrRoute.BrTblID.BtHdrLenID
748 size += 1 // m.BrRoute.BrNPaths
749 for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
750 var s2 fib_types.FibPath
752 if j2 < len(m.BrRoute.BrPaths) {
753 s2 = m.BrRoute.BrPaths[j2]
755 size += 4 // s2.SwIfIndex
756 size += 4 // s2.TableID
757 size += 4 // s2.RpfID
758 size += 1 // s2.Weight
759 size += 1 // s2.Preference
761 size += 4 // s2.Flags
762 size += 4 // s2.Proto
763 size += 1 * 16 // s2.Nh.Address
764 size += 4 // s2.Nh.ViaLabel
765 size += 4 // s2.Nh.ObjID
766 size += 4 // s2.Nh.ClassifyTableIndex
767 size += 1 // s2.NLabels
768 for j3 := 0; j3 < 16; j3++ {
769 size += 1 // s2.LabelStack[j3].IsUniform
770 size += 4 // s2.LabelStack[j3].Label
771 size += 1 // s2.LabelStack[j3].TTL
772 size += 1 // s2.LabelStack[j3].Exp
777 func (m *BierRouteAddDel) Marshal(b []byte) ([]byte, error) {
779 b = make([]byte, m.Size())
781 buf := codec.NewBuffer(b)
782 buf.EncodeBool(m.BrIsAdd)
783 buf.EncodeBool(m.BrIsReplace)
784 buf.EncodeUint32(m.BrRoute.BrBp)
785 buf.EncodeUint8(m.BrRoute.BrTblID.BtSet)
786 buf.EncodeUint8(m.BrRoute.BrTblID.BtSubDomain)
787 buf.EncodeUint8(m.BrRoute.BrTblID.BtHdrLenID)
788 buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
789 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
790 var v1 fib_types.FibPath // BrPaths
791 if j1 < len(m.BrRoute.BrPaths) {
792 v1 = m.BrRoute.BrPaths[j1]
794 buf.EncodeUint32(v1.SwIfIndex)
795 buf.EncodeUint32(v1.TableID)
796 buf.EncodeUint32(v1.RpfID)
797 buf.EncodeUint8(v1.Weight)
798 buf.EncodeUint8(v1.Preference)
799 buf.EncodeUint32(uint32(v1.Type))
800 buf.EncodeUint32(uint32(v1.Flags))
801 buf.EncodeUint32(uint32(v1.Proto))
802 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
803 buf.EncodeUint32(v1.Nh.ViaLabel)
804 buf.EncodeUint32(v1.Nh.ObjID)
805 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
806 buf.EncodeUint8(v1.NLabels)
807 for j2 := 0; j2 < 16; j2++ {
808 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
809 buf.EncodeUint32(v1.LabelStack[j2].Label)
810 buf.EncodeUint8(v1.LabelStack[j2].TTL)
811 buf.EncodeUint8(v1.LabelStack[j2].Exp)
814 return buf.Bytes(), nil
816 func (m *BierRouteAddDel) Unmarshal(b []byte) error {
817 buf := codec.NewBuffer(b)
818 m.BrIsAdd = buf.DecodeBool()
819 m.BrIsReplace = buf.DecodeBool()
820 m.BrRoute.BrBp = buf.DecodeUint32()
821 m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
822 m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
823 m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
824 m.BrRoute.BrNPaths = buf.DecodeUint8()
825 m.BrRoute.BrPaths = make([]fib_types.FibPath, m.BrRoute.BrNPaths)
826 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
827 m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
828 m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
829 m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
830 m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
831 m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
832 m.BrRoute.BrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
833 m.BrRoute.BrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
834 m.BrRoute.BrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
835 copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
836 m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
837 m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
838 m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
839 m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
840 for j2 := 0; j2 < 16; j2++ {
841 m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
842 m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
843 m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
844 m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
850 // BierRouteAddDelReply defines message 'bier_route_add_del_reply'.
851 type BierRouteAddDelReply struct {
852 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
855 func (m *BierRouteAddDelReply) Reset() { *m = BierRouteAddDelReply{} }
856 func (*BierRouteAddDelReply) GetMessageName() string { return "bier_route_add_del_reply" }
857 func (*BierRouteAddDelReply) GetCrcString() string { return "e8d4e804" }
858 func (*BierRouteAddDelReply) GetMessageType() api.MessageType {
859 return api.ReplyMessage
862 func (m *BierRouteAddDelReply) Size() (size int) {
866 size += 4 // m.Retval
869 func (m *BierRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
871 b = make([]byte, m.Size())
873 buf := codec.NewBuffer(b)
874 buf.EncodeInt32(m.Retval)
875 return buf.Bytes(), nil
877 func (m *BierRouteAddDelReply) Unmarshal(b []byte) error {
878 buf := codec.NewBuffer(b)
879 m.Retval = buf.DecodeInt32()
883 // BierRouteDetails defines message 'bier_route_details'.
884 type BierRouteDetails struct {
885 BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
888 func (m *BierRouteDetails) Reset() { *m = BierRouteDetails{} }
889 func (*BierRouteDetails) GetMessageName() string { return "bier_route_details" }
890 func (*BierRouteDetails) GetCrcString() string { return "39ee6a56" }
891 func (*BierRouteDetails) GetMessageType() api.MessageType {
892 return api.ReplyMessage
895 func (m *BierRouteDetails) Size() (size int) {
899 size += 4 // m.BrRoute.BrBp
900 size += 1 // m.BrRoute.BrTblID.BtSet
901 size += 1 // m.BrRoute.BrTblID.BtSubDomain
902 size += 1 // m.BrRoute.BrTblID.BtHdrLenID
903 size += 1 // m.BrRoute.BrNPaths
904 for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
905 var s2 fib_types.FibPath
907 if j2 < len(m.BrRoute.BrPaths) {
908 s2 = m.BrRoute.BrPaths[j2]
910 size += 4 // s2.SwIfIndex
911 size += 4 // s2.TableID
912 size += 4 // s2.RpfID
913 size += 1 // s2.Weight
914 size += 1 // s2.Preference
916 size += 4 // s2.Flags
917 size += 4 // s2.Proto
918 size += 1 * 16 // s2.Nh.Address
919 size += 4 // s2.Nh.ViaLabel
920 size += 4 // s2.Nh.ObjID
921 size += 4 // s2.Nh.ClassifyTableIndex
922 size += 1 // s2.NLabels
923 for j3 := 0; j3 < 16; j3++ {
924 size += 1 // s2.LabelStack[j3].IsUniform
925 size += 4 // s2.LabelStack[j3].Label
926 size += 1 // s2.LabelStack[j3].TTL
927 size += 1 // s2.LabelStack[j3].Exp
932 func (m *BierRouteDetails) Marshal(b []byte) ([]byte, error) {
934 b = make([]byte, m.Size())
936 buf := codec.NewBuffer(b)
937 buf.EncodeUint32(m.BrRoute.BrBp)
938 buf.EncodeUint8(m.BrRoute.BrTblID.BtSet)
939 buf.EncodeUint8(m.BrRoute.BrTblID.BtSubDomain)
940 buf.EncodeUint8(m.BrRoute.BrTblID.BtHdrLenID)
941 buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
942 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
943 var v1 fib_types.FibPath // BrPaths
944 if j1 < len(m.BrRoute.BrPaths) {
945 v1 = m.BrRoute.BrPaths[j1]
947 buf.EncodeUint32(v1.SwIfIndex)
948 buf.EncodeUint32(v1.TableID)
949 buf.EncodeUint32(v1.RpfID)
950 buf.EncodeUint8(v1.Weight)
951 buf.EncodeUint8(v1.Preference)
952 buf.EncodeUint32(uint32(v1.Type))
953 buf.EncodeUint32(uint32(v1.Flags))
954 buf.EncodeUint32(uint32(v1.Proto))
955 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
956 buf.EncodeUint32(v1.Nh.ViaLabel)
957 buf.EncodeUint32(v1.Nh.ObjID)
958 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
959 buf.EncodeUint8(v1.NLabels)
960 for j2 := 0; j2 < 16; j2++ {
961 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
962 buf.EncodeUint32(v1.LabelStack[j2].Label)
963 buf.EncodeUint8(v1.LabelStack[j2].TTL)
964 buf.EncodeUint8(v1.LabelStack[j2].Exp)
967 return buf.Bytes(), nil
969 func (m *BierRouteDetails) Unmarshal(b []byte) error {
970 buf := codec.NewBuffer(b)
971 m.BrRoute.BrBp = buf.DecodeUint32()
972 m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
973 m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
974 m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
975 m.BrRoute.BrNPaths = buf.DecodeUint8()
976 m.BrRoute.BrPaths = make([]fib_types.FibPath, m.BrRoute.BrNPaths)
977 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
978 m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
979 m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
980 m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
981 m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
982 m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
983 m.BrRoute.BrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
984 m.BrRoute.BrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
985 m.BrRoute.BrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
986 copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
987 m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
988 m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
989 m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
990 m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
991 for j2 := 0; j2 < 16; j2++ {
992 m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
993 m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
994 m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
995 m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1001 // BierRouteDump defines message 'bier_route_dump'.
1002 type BierRouteDump struct {
1003 BrTblID BierTableID `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
1006 func (m *BierRouteDump) Reset() { *m = BierRouteDump{} }
1007 func (*BierRouteDump) GetMessageName() string { return "bier_route_dump" }
1008 func (*BierRouteDump) GetCrcString() string { return "38339846" }
1009 func (*BierRouteDump) GetMessageType() api.MessageType {
1010 return api.RequestMessage
1013 func (m *BierRouteDump) Size() (size int) {
1017 size += 1 // m.BrTblID.BtSet
1018 size += 1 // m.BrTblID.BtSubDomain
1019 size += 1 // m.BrTblID.BtHdrLenID
1022 func (m *BierRouteDump) Marshal(b []byte) ([]byte, error) {
1024 b = make([]byte, m.Size())
1026 buf := codec.NewBuffer(b)
1027 buf.EncodeUint8(m.BrTblID.BtSet)
1028 buf.EncodeUint8(m.BrTblID.BtSubDomain)
1029 buf.EncodeUint8(m.BrTblID.BtHdrLenID)
1030 return buf.Bytes(), nil
1032 func (m *BierRouteDump) Unmarshal(b []byte) error {
1033 buf := codec.NewBuffer(b)
1034 m.BrTblID.BtSet = buf.DecodeUint8()
1035 m.BrTblID.BtSubDomain = buf.DecodeUint8()
1036 m.BrTblID.BtHdrLenID = buf.DecodeUint8()
1040 // BierTableAddDel defines message 'bier_table_add_del'.
1041 type BierTableAddDel struct {
1042 BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
1043 BtLabel uint32 `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
1044 BtIsAdd bool `binapi:"bool,name=bt_is_add" json:"bt_is_add,omitempty"`
1047 func (m *BierTableAddDel) Reset() { *m = BierTableAddDel{} }
1048 func (*BierTableAddDel) GetMessageName() string { return "bier_table_add_del" }
1049 func (*BierTableAddDel) GetCrcString() string { return "35e59209" }
1050 func (*BierTableAddDel) GetMessageType() api.MessageType {
1051 return api.RequestMessage
1054 func (m *BierTableAddDel) Size() (size int) {
1058 size += 1 // m.BtTblID.BtSet
1059 size += 1 // m.BtTblID.BtSubDomain
1060 size += 1 // m.BtTblID.BtHdrLenID
1061 size += 4 // m.BtLabel
1062 size += 1 // m.BtIsAdd
1065 func (m *BierTableAddDel) Marshal(b []byte) ([]byte, error) {
1067 b = make([]byte, m.Size())
1069 buf := codec.NewBuffer(b)
1070 buf.EncodeUint8(m.BtTblID.BtSet)
1071 buf.EncodeUint8(m.BtTblID.BtSubDomain)
1072 buf.EncodeUint8(m.BtTblID.BtHdrLenID)
1073 buf.EncodeUint32(m.BtLabel)
1074 buf.EncodeBool(m.BtIsAdd)
1075 return buf.Bytes(), nil
1077 func (m *BierTableAddDel) Unmarshal(b []byte) error {
1078 buf := codec.NewBuffer(b)
1079 m.BtTblID.BtSet = buf.DecodeUint8()
1080 m.BtTblID.BtSubDomain = buf.DecodeUint8()
1081 m.BtTblID.BtHdrLenID = buf.DecodeUint8()
1082 m.BtLabel = buf.DecodeUint32()
1083 m.BtIsAdd = buf.DecodeBool()
1087 // BierTableAddDelReply defines message 'bier_table_add_del_reply'.
1088 type BierTableAddDelReply struct {
1089 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1092 func (m *BierTableAddDelReply) Reset() { *m = BierTableAddDelReply{} }
1093 func (*BierTableAddDelReply) GetMessageName() string { return "bier_table_add_del_reply" }
1094 func (*BierTableAddDelReply) GetCrcString() string { return "e8d4e804" }
1095 func (*BierTableAddDelReply) GetMessageType() api.MessageType {
1096 return api.ReplyMessage
1099 func (m *BierTableAddDelReply) Size() (size int) {
1103 size += 4 // m.Retval
1106 func (m *BierTableAddDelReply) Marshal(b []byte) ([]byte, error) {
1108 b = make([]byte, m.Size())
1110 buf := codec.NewBuffer(b)
1111 buf.EncodeInt32(m.Retval)
1112 return buf.Bytes(), nil
1114 func (m *BierTableAddDelReply) Unmarshal(b []byte) error {
1115 buf := codec.NewBuffer(b)
1116 m.Retval = buf.DecodeInt32()
1120 // BierTableDetails defines message 'bier_table_details'.
1121 type BierTableDetails struct {
1122 BtLabel uint32 `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
1123 BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
1126 func (m *BierTableDetails) Reset() { *m = BierTableDetails{} }
1127 func (*BierTableDetails) GetMessageName() string { return "bier_table_details" }
1128 func (*BierTableDetails) GetCrcString() string { return "fc44a9dd" }
1129 func (*BierTableDetails) GetMessageType() api.MessageType {
1130 return api.ReplyMessage
1133 func (m *BierTableDetails) Size() (size int) {
1137 size += 4 // m.BtLabel
1138 size += 1 // m.BtTblID.BtSet
1139 size += 1 // m.BtTblID.BtSubDomain
1140 size += 1 // m.BtTblID.BtHdrLenID
1143 func (m *BierTableDetails) Marshal(b []byte) ([]byte, error) {
1145 b = make([]byte, m.Size())
1147 buf := codec.NewBuffer(b)
1148 buf.EncodeUint32(m.BtLabel)
1149 buf.EncodeUint8(m.BtTblID.BtSet)
1150 buf.EncodeUint8(m.BtTblID.BtSubDomain)
1151 buf.EncodeUint8(m.BtTblID.BtHdrLenID)
1152 return buf.Bytes(), nil
1154 func (m *BierTableDetails) Unmarshal(b []byte) error {
1155 buf := codec.NewBuffer(b)
1156 m.BtLabel = buf.DecodeUint32()
1157 m.BtTblID.BtSet = buf.DecodeUint8()
1158 m.BtTblID.BtSubDomain = buf.DecodeUint8()
1159 m.BtTblID.BtHdrLenID = buf.DecodeUint8()
1163 // BierTableDump defines message 'bier_table_dump'.
1164 type BierTableDump struct{}
1166 func (m *BierTableDump) Reset() { *m = BierTableDump{} }
1167 func (*BierTableDump) GetMessageName() string { return "bier_table_dump" }
1168 func (*BierTableDump) GetCrcString() string { return "51077d14" }
1169 func (*BierTableDump) GetMessageType() api.MessageType {
1170 return api.RequestMessage
1173 func (m *BierTableDump) Size() (size int) {
1179 func (m *BierTableDump) Marshal(b []byte) ([]byte, error) {
1181 b = make([]byte, m.Size())
1183 buf := codec.NewBuffer(b)
1184 return buf.Bytes(), nil
1186 func (m *BierTableDump) Unmarshal(b []byte) error {
1190 func init() { file_bier_binapi_init() }
1191 func file_bier_binapi_init() {
1192 api.RegisterMessage((*BierDispEntryAddDel)(nil), "bier_disp_entry_add_del_648323eb")
1193 api.RegisterMessage((*BierDispEntryAddDelReply)(nil), "bier_disp_entry_add_del_reply_e8d4e804")
1194 api.RegisterMessage((*BierDispEntryDetails)(nil), "bier_disp_entry_details_e5b039a9")
1195 api.RegisterMessage((*BierDispEntryDump)(nil), "bier_disp_entry_dump_b5fa54ad")
1196 api.RegisterMessage((*BierDispTableAddDel)(nil), "bier_disp_table_add_del_889657ac")
1197 api.RegisterMessage((*BierDispTableAddDelReply)(nil), "bier_disp_table_add_del_reply_e8d4e804")
1198 api.RegisterMessage((*BierDispTableDetails)(nil), "bier_disp_table_details_d27942c0")
1199 api.RegisterMessage((*BierDispTableDump)(nil), "bier_disp_table_dump_51077d14")
1200 api.RegisterMessage((*BierImpAdd)(nil), "bier_imp_add_3856dc3d")
1201 api.RegisterMessage((*BierImpAddReply)(nil), "bier_imp_add_reply_d49c5793")
1202 api.RegisterMessage((*BierImpDel)(nil), "bier_imp_del_7d45edf6")
1203 api.RegisterMessage((*BierImpDelReply)(nil), "bier_imp_del_reply_e8d4e804")
1204 api.RegisterMessage((*BierImpDetails)(nil), "bier_imp_details_b76192df")
1205 api.RegisterMessage((*BierImpDump)(nil), "bier_imp_dump_51077d14")
1206 api.RegisterMessage((*BierRouteAddDel)(nil), "bier_route_add_del_f29edca0")
1207 api.RegisterMessage((*BierRouteAddDelReply)(nil), "bier_route_add_del_reply_e8d4e804")
1208 api.RegisterMessage((*BierRouteDetails)(nil), "bier_route_details_39ee6a56")
1209 api.RegisterMessage((*BierRouteDump)(nil), "bier_route_dump_38339846")
1210 api.RegisterMessage((*BierTableAddDel)(nil), "bier_table_add_del_35e59209")
1211 api.RegisterMessage((*BierTableAddDelReply)(nil), "bier_table_add_del_reply_e8d4e804")
1212 api.RegisterMessage((*BierTableDetails)(nil), "bier_table_details_fc44a9dd")
1213 api.RegisterMessage((*BierTableDump)(nil), "bier_table_dump_51077d14")
1216 // Messages returns list of all messages in this module.
1217 func AllMessages() []api.Message {
1218 return []api.Message{
1219 (*BierDispEntryAddDel)(nil),
1220 (*BierDispEntryAddDelReply)(nil),
1221 (*BierDispEntryDetails)(nil),
1222 (*BierDispEntryDump)(nil),
1223 (*BierDispTableAddDel)(nil),
1224 (*BierDispTableAddDelReply)(nil),
1225 (*BierDispTableDetails)(nil),
1226 (*BierDispTableDump)(nil),
1228 (*BierImpAddReply)(nil),
1230 (*BierImpDelReply)(nil),
1231 (*BierImpDetails)(nil),
1232 (*BierImpDump)(nil),
1233 (*BierRouteAddDel)(nil),
1234 (*BierRouteAddDelReply)(nil),
1235 (*BierRouteDetails)(nil),
1236 (*BierRouteDump)(nil),
1237 (*BierTableAddDel)(nil),
1238 (*BierTableAddDelReply)(nil),
1239 (*BierTableDetails)(nil),
1240 (*BierTableDump)(nil),