1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/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 = 0x9196a2d4
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 "648323eb" }
62 func (*BierDispEntryAddDel) GetMessageType() api.MessageType {
63 return api.RequestMessage
66 func (m *BierDispEntryAddDel) Size() int {
72 size += 4 // m.BdeTblID
73 size += 1 // m.BdeIsAdd
74 size += 1 // m.BdePayloadProto
75 size += 1 // m.BdeNPaths
76 for j1 := 0; j1 < len(m.BdePaths); j1++ {
77 var s1 fib_types.FibPath
79 if j1 < len(m.BdePaths) {
82 size += 4 // s1.SwIfIndex
83 size += 4 // s1.TableID
85 size += 1 // s1.Weight
86 size += 1 // s1.Preference
90 size += 1 * 16 // s1.Nh.Address
91 size += 4 // s1.Nh.ViaLabel
92 size += 4 // s1.Nh.ObjID
93 size += 4 // s1.Nh.ClassifyTableIndex
94 size += 1 // s1.NLabels
95 for j2 := 0; j2 < 16; j2++ {
96 var s2 fib_types.FibMplsLabel
98 if j2 < len(s1.LabelStack) {
99 s2 = s1.LabelStack[j2]
101 size += 1 // s2.IsUniform
102 size += 4 // s2.Label
109 func (m *BierDispEntryAddDel) Marshal(b []byte) ([]byte, error) {
110 var buf *codec.Buffer
112 buf = codec.NewBuffer(make([]byte, m.Size()))
114 buf = codec.NewBuffer(b)
116 buf.EncodeUint16(uint16(m.BdeBp))
117 buf.EncodeUint32(uint32(m.BdeTblID))
118 buf.EncodeBool(m.BdeIsAdd)
119 buf.EncodeUint8(uint8(m.BdePayloadProto))
120 buf.EncodeUint8(uint8(len(m.BdePaths)))
121 for j0 := 0; j0 < len(m.BdePaths); j0++ {
122 var v0 fib_types.FibPath
123 if j0 < len(m.BdePaths) {
126 buf.EncodeUint32(uint32(v0.SwIfIndex))
127 buf.EncodeUint32(uint32(v0.TableID))
128 buf.EncodeUint32(uint32(v0.RpfID))
129 buf.EncodeUint8(uint8(v0.Weight))
130 buf.EncodeUint8(uint8(v0.Preference))
131 buf.EncodeUint32(uint32(v0.Type))
132 buf.EncodeUint32(uint32(v0.Flags))
133 buf.EncodeUint32(uint32(v0.Proto))
134 buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 0)
135 buf.EncodeUint32(uint32(v0.Nh.ViaLabel))
136 buf.EncodeUint32(uint32(v0.Nh.ObjID))
137 buf.EncodeUint32(uint32(v0.Nh.ClassifyTableIndex))
138 buf.EncodeUint8(uint8(v0.NLabels))
139 for j1 := 0; j1 < 16; j1++ {
140 var v1 fib_types.FibMplsLabel
141 if j1 < len(v0.LabelStack) {
142 v1 = v0.LabelStack[j1]
144 buf.EncodeUint8(uint8(v1.IsUniform))
145 buf.EncodeUint32(uint32(v1.Label))
146 buf.EncodeUint8(uint8(v1.TTL))
147 buf.EncodeUint8(uint8(v1.Exp))
150 return buf.Bytes(), nil
152 func (m *BierDispEntryAddDel) Unmarshal(b []byte) error {
153 buf := codec.NewBuffer(b)
154 m.BdeBp = buf.DecodeUint16()
155 m.BdeTblID = buf.DecodeUint32()
156 m.BdeIsAdd = buf.DecodeBool()
157 m.BdePayloadProto = buf.DecodeUint8()
158 m.BdeNPaths = buf.DecodeUint8()
159 m.BdePaths = make([]fib_types.FibPath, int(m.BdeNPaths))
160 for j0 := 0; j0 < len(m.BdePaths); j0++ {
161 m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
162 m.BdePaths[j0].TableID = buf.DecodeUint32()
163 m.BdePaths[j0].RpfID = buf.DecodeUint32()
164 m.BdePaths[j0].Weight = buf.DecodeUint8()
165 m.BdePaths[j0].Preference = buf.DecodeUint8()
166 m.BdePaths[j0].Type = fib_types.FibPathType(buf.DecodeUint32())
167 m.BdePaths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
168 m.BdePaths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
169 copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
170 m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
171 m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
172 m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
173 m.BdePaths[j0].NLabels = buf.DecodeUint8()
174 for j1 := 0; j1 < 16; j1++ {
175 m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
176 m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
177 m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
178 m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
184 // BierDispEntryAddDelReply defines message 'bier_disp_entry_add_del_reply'.
185 type BierDispEntryAddDelReply struct {
186 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
189 func (m *BierDispEntryAddDelReply) Reset() { *m = BierDispEntryAddDelReply{} }
190 func (*BierDispEntryAddDelReply) GetMessageName() string { return "bier_disp_entry_add_del_reply" }
191 func (*BierDispEntryAddDelReply) GetCrcString() string { return "e8d4e804" }
192 func (*BierDispEntryAddDelReply) GetMessageType() api.MessageType {
193 return api.ReplyMessage
196 func (m *BierDispEntryAddDelReply) Size() int {
201 size += 4 // m.Retval
204 func (m *BierDispEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
205 var buf *codec.Buffer
207 buf = codec.NewBuffer(make([]byte, m.Size()))
209 buf = codec.NewBuffer(b)
211 buf.EncodeUint32(uint32(m.Retval))
212 return buf.Bytes(), nil
214 func (m *BierDispEntryAddDelReply) Unmarshal(b []byte) error {
215 buf := codec.NewBuffer(b)
216 m.Retval = int32(buf.DecodeUint32())
220 // BierDispEntryDetails defines message 'bier_disp_entry_details'.
221 type BierDispEntryDetails struct {
222 BdeBp uint16 `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
223 BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
224 BdeIsAdd bool `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
225 BdePayloadProto uint8 `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
226 BdeNPaths uint8 `binapi:"u8,name=bde_n_paths" json:"-"`
227 BdePaths []fib_types.FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
230 func (m *BierDispEntryDetails) Reset() { *m = BierDispEntryDetails{} }
231 func (*BierDispEntryDetails) GetMessageName() string { return "bier_disp_entry_details" }
232 func (*BierDispEntryDetails) GetCrcString() string { return "e5b039a9" }
233 func (*BierDispEntryDetails) GetMessageType() api.MessageType {
234 return api.ReplyMessage
237 func (m *BierDispEntryDetails) Size() int {
243 size += 4 // m.BdeTblID
244 size += 1 // m.BdeIsAdd
245 size += 1 // m.BdePayloadProto
246 size += 1 // m.BdeNPaths
247 for j1 := 0; j1 < len(m.BdePaths); j1++ {
248 var s1 fib_types.FibPath
250 if j1 < len(m.BdePaths) {
253 size += 4 // s1.SwIfIndex
254 size += 4 // s1.TableID
255 size += 4 // s1.RpfID
256 size += 1 // s1.Weight
257 size += 1 // s1.Preference
259 size += 4 // s1.Flags
260 size += 4 // s1.Proto
261 size += 1 * 16 // s1.Nh.Address
262 size += 4 // s1.Nh.ViaLabel
263 size += 4 // s1.Nh.ObjID
264 size += 4 // s1.Nh.ClassifyTableIndex
265 size += 1 // s1.NLabels
266 for j2 := 0; j2 < 16; j2++ {
267 var s2 fib_types.FibMplsLabel
269 if j2 < len(s1.LabelStack) {
270 s2 = s1.LabelStack[j2]
272 size += 1 // s2.IsUniform
273 size += 4 // s2.Label
280 func (m *BierDispEntryDetails) Marshal(b []byte) ([]byte, error) {
281 var buf *codec.Buffer
283 buf = codec.NewBuffer(make([]byte, m.Size()))
285 buf = codec.NewBuffer(b)
287 buf.EncodeUint16(uint16(m.BdeBp))
288 buf.EncodeUint32(uint32(m.BdeTblID))
289 buf.EncodeBool(m.BdeIsAdd)
290 buf.EncodeUint8(uint8(m.BdePayloadProto))
291 buf.EncodeUint8(uint8(len(m.BdePaths)))
292 for j0 := 0; j0 < len(m.BdePaths); j0++ {
293 var v0 fib_types.FibPath
294 if j0 < len(m.BdePaths) {
297 buf.EncodeUint32(uint32(v0.SwIfIndex))
298 buf.EncodeUint32(uint32(v0.TableID))
299 buf.EncodeUint32(uint32(v0.RpfID))
300 buf.EncodeUint8(uint8(v0.Weight))
301 buf.EncodeUint8(uint8(v0.Preference))
302 buf.EncodeUint32(uint32(v0.Type))
303 buf.EncodeUint32(uint32(v0.Flags))
304 buf.EncodeUint32(uint32(v0.Proto))
305 buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 0)
306 buf.EncodeUint32(uint32(v0.Nh.ViaLabel))
307 buf.EncodeUint32(uint32(v0.Nh.ObjID))
308 buf.EncodeUint32(uint32(v0.Nh.ClassifyTableIndex))
309 buf.EncodeUint8(uint8(v0.NLabels))
310 for j1 := 0; j1 < 16; j1++ {
311 var v1 fib_types.FibMplsLabel
312 if j1 < len(v0.LabelStack) {
313 v1 = v0.LabelStack[j1]
315 buf.EncodeUint8(uint8(v1.IsUniform))
316 buf.EncodeUint32(uint32(v1.Label))
317 buf.EncodeUint8(uint8(v1.TTL))
318 buf.EncodeUint8(uint8(v1.Exp))
321 return buf.Bytes(), nil
323 func (m *BierDispEntryDetails) Unmarshal(b []byte) error {
324 buf := codec.NewBuffer(b)
325 m.BdeBp = buf.DecodeUint16()
326 m.BdeTblID = buf.DecodeUint32()
327 m.BdeIsAdd = buf.DecodeBool()
328 m.BdePayloadProto = buf.DecodeUint8()
329 m.BdeNPaths = buf.DecodeUint8()
330 m.BdePaths = make([]fib_types.FibPath, int(m.BdeNPaths))
331 for j0 := 0; j0 < len(m.BdePaths); j0++ {
332 m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
333 m.BdePaths[j0].TableID = buf.DecodeUint32()
334 m.BdePaths[j0].RpfID = buf.DecodeUint32()
335 m.BdePaths[j0].Weight = buf.DecodeUint8()
336 m.BdePaths[j0].Preference = buf.DecodeUint8()
337 m.BdePaths[j0].Type = fib_types.FibPathType(buf.DecodeUint32())
338 m.BdePaths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
339 m.BdePaths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
340 copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
341 m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
342 m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
343 m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
344 m.BdePaths[j0].NLabels = buf.DecodeUint8()
345 for j1 := 0; j1 < 16; j1++ {
346 m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
347 m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
348 m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
349 m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
355 // BierDispEntryDump defines message 'bier_disp_entry_dump'.
356 type BierDispEntryDump struct {
357 BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
360 func (m *BierDispEntryDump) Reset() { *m = BierDispEntryDump{} }
361 func (*BierDispEntryDump) GetMessageName() string { return "bier_disp_entry_dump" }
362 func (*BierDispEntryDump) GetCrcString() string { return "b5fa54ad" }
363 func (*BierDispEntryDump) GetMessageType() api.MessageType {
364 return api.RequestMessage
367 func (m *BierDispEntryDump) Size() int {
372 size += 4 // m.BdeTblID
375 func (m *BierDispEntryDump) Marshal(b []byte) ([]byte, error) {
376 var buf *codec.Buffer
378 buf = codec.NewBuffer(make([]byte, m.Size()))
380 buf = codec.NewBuffer(b)
382 buf.EncodeUint32(uint32(m.BdeTblID))
383 return buf.Bytes(), nil
385 func (m *BierDispEntryDump) Unmarshal(b []byte) error {
386 buf := codec.NewBuffer(b)
387 m.BdeTblID = buf.DecodeUint32()
391 // BierDispTableAddDel defines message 'bier_disp_table_add_del'.
392 type BierDispTableAddDel struct {
393 BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
394 BdtIsAdd bool `binapi:"bool,name=bdt_is_add" json:"bdt_is_add,omitempty"`
397 func (m *BierDispTableAddDel) Reset() { *m = BierDispTableAddDel{} }
398 func (*BierDispTableAddDel) GetMessageName() string { return "bier_disp_table_add_del" }
399 func (*BierDispTableAddDel) GetCrcString() string { return "889657ac" }
400 func (*BierDispTableAddDel) GetMessageType() api.MessageType {
401 return api.RequestMessage
404 func (m *BierDispTableAddDel) Size() int {
409 size += 4 // m.BdtTblID
410 size += 1 // m.BdtIsAdd
413 func (m *BierDispTableAddDel) Marshal(b []byte) ([]byte, error) {
414 var buf *codec.Buffer
416 buf = codec.NewBuffer(make([]byte, m.Size()))
418 buf = codec.NewBuffer(b)
420 buf.EncodeUint32(uint32(m.BdtTblID))
421 buf.EncodeBool(m.BdtIsAdd)
422 return buf.Bytes(), nil
424 func (m *BierDispTableAddDel) Unmarshal(b []byte) error {
425 buf := codec.NewBuffer(b)
426 m.BdtTblID = buf.DecodeUint32()
427 m.BdtIsAdd = buf.DecodeBool()
431 // BierDispTableAddDelReply defines message 'bier_disp_table_add_del_reply'.
432 type BierDispTableAddDelReply struct {
433 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
436 func (m *BierDispTableAddDelReply) Reset() { *m = BierDispTableAddDelReply{} }
437 func (*BierDispTableAddDelReply) GetMessageName() string { return "bier_disp_table_add_del_reply" }
438 func (*BierDispTableAddDelReply) GetCrcString() string { return "e8d4e804" }
439 func (*BierDispTableAddDelReply) GetMessageType() api.MessageType {
440 return api.ReplyMessage
443 func (m *BierDispTableAddDelReply) Size() int {
448 size += 4 // m.Retval
451 func (m *BierDispTableAddDelReply) Marshal(b []byte) ([]byte, error) {
452 var buf *codec.Buffer
454 buf = codec.NewBuffer(make([]byte, m.Size()))
456 buf = codec.NewBuffer(b)
458 buf.EncodeUint32(uint32(m.Retval))
459 return buf.Bytes(), nil
461 func (m *BierDispTableAddDelReply) Unmarshal(b []byte) error {
462 buf := codec.NewBuffer(b)
463 m.Retval = int32(buf.DecodeUint32())
467 // BierDispTableDetails defines message 'bier_disp_table_details'.
468 type BierDispTableDetails struct {
469 BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
472 func (m *BierDispTableDetails) Reset() { *m = BierDispTableDetails{} }
473 func (*BierDispTableDetails) GetMessageName() string { return "bier_disp_table_details" }
474 func (*BierDispTableDetails) GetCrcString() string { return "d27942c0" }
475 func (*BierDispTableDetails) GetMessageType() api.MessageType {
476 return api.ReplyMessage
479 func (m *BierDispTableDetails) Size() int {
484 size += 4 // m.BdtTblID
487 func (m *BierDispTableDetails) Marshal(b []byte) ([]byte, error) {
488 var buf *codec.Buffer
490 buf = codec.NewBuffer(make([]byte, m.Size()))
492 buf = codec.NewBuffer(b)
494 buf.EncodeUint32(uint32(m.BdtTblID))
495 return buf.Bytes(), nil
497 func (m *BierDispTableDetails) Unmarshal(b []byte) error {
498 buf := codec.NewBuffer(b)
499 m.BdtTblID = buf.DecodeUint32()
503 // BierDispTableDump defines message 'bier_disp_table_dump'.
504 type BierDispTableDump struct{}
506 func (m *BierDispTableDump) Reset() { *m = BierDispTableDump{} }
507 func (*BierDispTableDump) GetMessageName() string { return "bier_disp_table_dump" }
508 func (*BierDispTableDump) GetCrcString() string { return "51077d14" }
509 func (*BierDispTableDump) GetMessageType() api.MessageType {
510 return api.RequestMessage
513 func (m *BierDispTableDump) Size() int {
520 func (m *BierDispTableDump) Marshal(b []byte) ([]byte, error) {
521 var buf *codec.Buffer
523 buf = codec.NewBuffer(make([]byte, m.Size()))
525 buf = codec.NewBuffer(b)
527 return buf.Bytes(), nil
529 func (m *BierDispTableDump) Unmarshal(b []byte) error {
533 // BierImpAdd defines message 'bier_imp_add'.
534 type BierImpAdd struct {
535 BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
536 BiSrc uint16 `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
537 BiNBytes uint8 `binapi:"u8,name=bi_n_bytes" json:"-"`
538 BiBytes []byte `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
541 func (m *BierImpAdd) Reset() { *m = BierImpAdd{} }
542 func (*BierImpAdd) GetMessageName() string { return "bier_imp_add" }
543 func (*BierImpAdd) GetCrcString() string { return "3856dc3d" }
544 func (*BierImpAdd) GetMessageType() api.MessageType {
545 return api.RequestMessage
548 func (m *BierImpAdd) Size() int {
553 size += 1 // m.BiTblID.BtSet
554 size += 1 // m.BiTblID.BtSubDomain
555 size += 1 // m.BiTblID.BtHdrLenID
557 size += 1 // m.BiNBytes
558 size += 1 * len(m.BiBytes) // m.BiBytes
561 func (m *BierImpAdd) Marshal(b []byte) ([]byte, error) {
562 var buf *codec.Buffer
564 buf = codec.NewBuffer(make([]byte, m.Size()))
566 buf = codec.NewBuffer(b)
568 buf.EncodeUint8(uint8(m.BiTblID.BtSet))
569 buf.EncodeUint8(uint8(m.BiTblID.BtSubDomain))
570 buf.EncodeUint8(uint8(m.BiTblID.BtHdrLenID))
571 buf.EncodeUint16(uint16(m.BiSrc))
572 buf.EncodeUint8(uint8(len(m.BiBytes)))
573 buf.EncodeBytes(m.BiBytes[:], 0)
574 return buf.Bytes(), nil
576 func (m *BierImpAdd) Unmarshal(b []byte) error {
577 buf := codec.NewBuffer(b)
578 m.BiTblID.BtSet = buf.DecodeUint8()
579 m.BiTblID.BtSubDomain = buf.DecodeUint8()
580 m.BiTblID.BtHdrLenID = buf.DecodeUint8()
581 m.BiSrc = buf.DecodeUint16()
582 m.BiNBytes = buf.DecodeUint8()
583 copy(m.BiBytes[:], buf.DecodeBytes(0))
587 // BierImpAddReply defines message 'bier_imp_add_reply'.
588 type BierImpAddReply struct {
589 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
590 BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
593 func (m *BierImpAddReply) Reset() { *m = BierImpAddReply{} }
594 func (*BierImpAddReply) GetMessageName() string { return "bier_imp_add_reply" }
595 func (*BierImpAddReply) GetCrcString() string { return "d49c5793" }
596 func (*BierImpAddReply) GetMessageType() api.MessageType {
597 return api.ReplyMessage
600 func (m *BierImpAddReply) Size() int {
605 size += 4 // m.Retval
606 size += 4 // m.BiIndex
609 func (m *BierImpAddReply) Marshal(b []byte) ([]byte, error) {
610 var buf *codec.Buffer
612 buf = codec.NewBuffer(make([]byte, m.Size()))
614 buf = codec.NewBuffer(b)
616 buf.EncodeUint32(uint32(m.Retval))
617 buf.EncodeUint32(uint32(m.BiIndex))
618 return buf.Bytes(), nil
620 func (m *BierImpAddReply) Unmarshal(b []byte) error {
621 buf := codec.NewBuffer(b)
622 m.Retval = int32(buf.DecodeUint32())
623 m.BiIndex = buf.DecodeUint32()
627 // BierImpDel defines message 'bier_imp_del'.
628 type BierImpDel struct {
629 BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
632 func (m *BierImpDel) Reset() { *m = BierImpDel{} }
633 func (*BierImpDel) GetMessageName() string { return "bier_imp_del" }
634 func (*BierImpDel) GetCrcString() string { return "7d45edf6" }
635 func (*BierImpDel) GetMessageType() api.MessageType {
636 return api.RequestMessage
639 func (m *BierImpDel) Size() int {
644 size += 4 // m.BiIndex
647 func (m *BierImpDel) Marshal(b []byte) ([]byte, error) {
648 var buf *codec.Buffer
650 buf = codec.NewBuffer(make([]byte, m.Size()))
652 buf = codec.NewBuffer(b)
654 buf.EncodeUint32(uint32(m.BiIndex))
655 return buf.Bytes(), nil
657 func (m *BierImpDel) Unmarshal(b []byte) error {
658 buf := codec.NewBuffer(b)
659 m.BiIndex = buf.DecodeUint32()
663 // BierImpDelReply defines message 'bier_imp_del_reply'.
664 type BierImpDelReply struct {
665 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
668 func (m *BierImpDelReply) Reset() { *m = BierImpDelReply{} }
669 func (*BierImpDelReply) GetMessageName() string { return "bier_imp_del_reply" }
670 func (*BierImpDelReply) GetCrcString() string { return "e8d4e804" }
671 func (*BierImpDelReply) GetMessageType() api.MessageType {
672 return api.ReplyMessage
675 func (m *BierImpDelReply) Size() int {
680 size += 4 // m.Retval
683 func (m *BierImpDelReply) Marshal(b []byte) ([]byte, error) {
684 var buf *codec.Buffer
686 buf = codec.NewBuffer(make([]byte, m.Size()))
688 buf = codec.NewBuffer(b)
690 buf.EncodeUint32(uint32(m.Retval))
691 return buf.Bytes(), nil
693 func (m *BierImpDelReply) Unmarshal(b []byte) error {
694 buf := codec.NewBuffer(b)
695 m.Retval = int32(buf.DecodeUint32())
699 // BierImpDetails defines message 'bier_imp_details'.
700 type BierImpDetails struct {
701 BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
702 BiSrc uint16 `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
703 BiNBytes uint8 `binapi:"u8,name=bi_n_bytes" json:"-"`
704 BiBytes []byte `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
707 func (m *BierImpDetails) Reset() { *m = BierImpDetails{} }
708 func (*BierImpDetails) GetMessageName() string { return "bier_imp_details" }
709 func (*BierImpDetails) GetCrcString() string { return "b76192df" }
710 func (*BierImpDetails) GetMessageType() api.MessageType {
711 return api.ReplyMessage
714 func (m *BierImpDetails) Size() int {
719 size += 1 // m.BiTblID.BtSet
720 size += 1 // m.BiTblID.BtSubDomain
721 size += 1 // m.BiTblID.BtHdrLenID
723 size += 1 // m.BiNBytes
724 size += 1 * len(m.BiBytes) // m.BiBytes
727 func (m *BierImpDetails) Marshal(b []byte) ([]byte, error) {
728 var buf *codec.Buffer
730 buf = codec.NewBuffer(make([]byte, m.Size()))
732 buf = codec.NewBuffer(b)
734 buf.EncodeUint8(uint8(m.BiTblID.BtSet))
735 buf.EncodeUint8(uint8(m.BiTblID.BtSubDomain))
736 buf.EncodeUint8(uint8(m.BiTblID.BtHdrLenID))
737 buf.EncodeUint16(uint16(m.BiSrc))
738 buf.EncodeUint8(uint8(len(m.BiBytes)))
739 buf.EncodeBytes(m.BiBytes[:], 0)
740 return buf.Bytes(), nil
742 func (m *BierImpDetails) Unmarshal(b []byte) error {
743 buf := codec.NewBuffer(b)
744 m.BiTblID.BtSet = buf.DecodeUint8()
745 m.BiTblID.BtSubDomain = buf.DecodeUint8()
746 m.BiTblID.BtHdrLenID = buf.DecodeUint8()
747 m.BiSrc = buf.DecodeUint16()
748 m.BiNBytes = buf.DecodeUint8()
749 copy(m.BiBytes[:], buf.DecodeBytes(0))
753 // BierImpDump defines message 'bier_imp_dump'.
754 type BierImpDump struct{}
756 func (m *BierImpDump) Reset() { *m = BierImpDump{} }
757 func (*BierImpDump) GetMessageName() string { return "bier_imp_dump" }
758 func (*BierImpDump) GetCrcString() string { return "51077d14" }
759 func (*BierImpDump) GetMessageType() api.MessageType {
760 return api.RequestMessage
763 func (m *BierImpDump) Size() int {
770 func (m *BierImpDump) Marshal(b []byte) ([]byte, error) {
771 var buf *codec.Buffer
773 buf = codec.NewBuffer(make([]byte, m.Size()))
775 buf = codec.NewBuffer(b)
777 return buf.Bytes(), nil
779 func (m *BierImpDump) Unmarshal(b []byte) error {
783 // BierRouteAddDel defines message 'bier_route_add_del'.
784 type BierRouteAddDel struct {
785 BrIsAdd bool `binapi:"bool,name=br_is_add" json:"br_is_add,omitempty"`
786 BrIsReplace bool `binapi:"bool,name=br_is_replace" json:"br_is_replace,omitempty"`
787 BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
790 func (m *BierRouteAddDel) Reset() { *m = BierRouteAddDel{} }
791 func (*BierRouteAddDel) GetMessageName() string { return "bier_route_add_del" }
792 func (*BierRouteAddDel) GetCrcString() string { return "f29edca0" }
793 func (*BierRouteAddDel) GetMessageType() api.MessageType {
794 return api.RequestMessage
797 func (m *BierRouteAddDel) Size() int {
802 size += 1 // m.BrIsAdd
803 size += 1 // m.BrIsReplace
804 size += 4 // m.BrRoute.BrBp
805 size += 1 // m.BrRoute.BrTblID.BtSet
806 size += 1 // m.BrRoute.BrTblID.BtSubDomain
807 size += 1 // m.BrRoute.BrTblID.BtHdrLenID
808 size += 1 // m.BrRoute.BrNPaths
809 for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
810 var s2 fib_types.FibPath
812 if j2 < len(m.BrRoute.BrPaths) {
813 s2 = m.BrRoute.BrPaths[j2]
815 size += 4 // s2.SwIfIndex
816 size += 4 // s2.TableID
817 size += 4 // s2.RpfID
818 size += 1 // s2.Weight
819 size += 1 // s2.Preference
821 size += 4 // s2.Flags
822 size += 4 // s2.Proto
823 size += 1 * 16 // s2.Nh.Address
824 size += 4 // s2.Nh.ViaLabel
825 size += 4 // s2.Nh.ObjID
826 size += 4 // s2.Nh.ClassifyTableIndex
827 size += 1 // s2.NLabels
828 for j3 := 0; j3 < 16; j3++ {
829 var s3 fib_types.FibMplsLabel
831 if j3 < len(s2.LabelStack) {
832 s3 = s2.LabelStack[j3]
834 size += 1 // s3.IsUniform
835 size += 4 // s3.Label
842 func (m *BierRouteAddDel) Marshal(b []byte) ([]byte, error) {
843 var buf *codec.Buffer
845 buf = codec.NewBuffer(make([]byte, m.Size()))
847 buf = codec.NewBuffer(b)
849 buf.EncodeBool(m.BrIsAdd)
850 buf.EncodeBool(m.BrIsReplace)
851 buf.EncodeUint32(uint32(m.BrRoute.BrBp))
852 buf.EncodeUint8(uint8(m.BrRoute.BrTblID.BtSet))
853 buf.EncodeUint8(uint8(m.BrRoute.BrTblID.BtSubDomain))
854 buf.EncodeUint8(uint8(m.BrRoute.BrTblID.BtHdrLenID))
855 buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
856 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
857 var v1 fib_types.FibPath
858 if j1 < len(m.BrRoute.BrPaths) {
859 v1 = m.BrRoute.BrPaths[j1]
861 buf.EncodeUint32(uint32(v1.SwIfIndex))
862 buf.EncodeUint32(uint32(v1.TableID))
863 buf.EncodeUint32(uint32(v1.RpfID))
864 buf.EncodeUint8(uint8(v1.Weight))
865 buf.EncodeUint8(uint8(v1.Preference))
866 buf.EncodeUint32(uint32(v1.Type))
867 buf.EncodeUint32(uint32(v1.Flags))
868 buf.EncodeUint32(uint32(v1.Proto))
869 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
870 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
871 buf.EncodeUint32(uint32(v1.Nh.ObjID))
872 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
873 buf.EncodeUint8(uint8(v1.NLabels))
874 for j2 := 0; j2 < 16; j2++ {
875 var v2 fib_types.FibMplsLabel
876 if j2 < len(v1.LabelStack) {
877 v2 = v1.LabelStack[j2]
879 buf.EncodeUint8(uint8(v2.IsUniform))
880 buf.EncodeUint32(uint32(v2.Label))
881 buf.EncodeUint8(uint8(v2.TTL))
882 buf.EncodeUint8(uint8(v2.Exp))
885 return buf.Bytes(), nil
887 func (m *BierRouteAddDel) Unmarshal(b []byte) error {
888 buf := codec.NewBuffer(b)
889 m.BrIsAdd = buf.DecodeBool()
890 m.BrIsReplace = buf.DecodeBool()
891 m.BrRoute.BrBp = buf.DecodeUint32()
892 m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
893 m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
894 m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
895 m.BrRoute.BrNPaths = buf.DecodeUint8()
896 m.BrRoute.BrPaths = make([]fib_types.FibPath, int(m.BrRoute.BrNPaths))
897 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
898 m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
899 m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
900 m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
901 m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
902 m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
903 m.BrRoute.BrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
904 m.BrRoute.BrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
905 m.BrRoute.BrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
906 copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
907 m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
908 m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
909 m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
910 m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
911 for j2 := 0; j2 < 16; j2++ {
912 m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
913 m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
914 m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
915 m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
921 // BierRouteAddDelReply defines message 'bier_route_add_del_reply'.
922 type BierRouteAddDelReply struct {
923 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
926 func (m *BierRouteAddDelReply) Reset() { *m = BierRouteAddDelReply{} }
927 func (*BierRouteAddDelReply) GetMessageName() string { return "bier_route_add_del_reply" }
928 func (*BierRouteAddDelReply) GetCrcString() string { return "e8d4e804" }
929 func (*BierRouteAddDelReply) GetMessageType() api.MessageType {
930 return api.ReplyMessage
933 func (m *BierRouteAddDelReply) Size() int {
938 size += 4 // m.Retval
941 func (m *BierRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
942 var buf *codec.Buffer
944 buf = codec.NewBuffer(make([]byte, m.Size()))
946 buf = codec.NewBuffer(b)
948 buf.EncodeUint32(uint32(m.Retval))
949 return buf.Bytes(), nil
951 func (m *BierRouteAddDelReply) Unmarshal(b []byte) error {
952 buf := codec.NewBuffer(b)
953 m.Retval = int32(buf.DecodeUint32())
957 // BierRouteDetails defines message 'bier_route_details'.
958 type BierRouteDetails struct {
959 BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
962 func (m *BierRouteDetails) Reset() { *m = BierRouteDetails{} }
963 func (*BierRouteDetails) GetMessageName() string { return "bier_route_details" }
964 func (*BierRouteDetails) GetCrcString() string { return "39ee6a56" }
965 func (*BierRouteDetails) GetMessageType() api.MessageType {
966 return api.ReplyMessage
969 func (m *BierRouteDetails) Size() int {
974 size += 4 // m.BrRoute.BrBp
975 size += 1 // m.BrRoute.BrTblID.BtSet
976 size += 1 // m.BrRoute.BrTblID.BtSubDomain
977 size += 1 // m.BrRoute.BrTblID.BtHdrLenID
978 size += 1 // m.BrRoute.BrNPaths
979 for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
980 var s2 fib_types.FibPath
982 if j2 < len(m.BrRoute.BrPaths) {
983 s2 = m.BrRoute.BrPaths[j2]
985 size += 4 // s2.SwIfIndex
986 size += 4 // s2.TableID
987 size += 4 // s2.RpfID
988 size += 1 // s2.Weight
989 size += 1 // s2.Preference
991 size += 4 // s2.Flags
992 size += 4 // s2.Proto
993 size += 1 * 16 // s2.Nh.Address
994 size += 4 // s2.Nh.ViaLabel
995 size += 4 // s2.Nh.ObjID
996 size += 4 // s2.Nh.ClassifyTableIndex
997 size += 1 // s2.NLabels
998 for j3 := 0; j3 < 16; j3++ {
999 var s3 fib_types.FibMplsLabel
1001 if j3 < len(s2.LabelStack) {
1002 s3 = s2.LabelStack[j3]
1004 size += 1 // s3.IsUniform
1005 size += 4 // s3.Label
1012 func (m *BierRouteDetails) Marshal(b []byte) ([]byte, error) {
1013 var buf *codec.Buffer
1015 buf = codec.NewBuffer(make([]byte, m.Size()))
1017 buf = codec.NewBuffer(b)
1019 buf.EncodeUint32(uint32(m.BrRoute.BrBp))
1020 buf.EncodeUint8(uint8(m.BrRoute.BrTblID.BtSet))
1021 buf.EncodeUint8(uint8(m.BrRoute.BrTblID.BtSubDomain))
1022 buf.EncodeUint8(uint8(m.BrRoute.BrTblID.BtHdrLenID))
1023 buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
1024 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
1025 var v1 fib_types.FibPath
1026 if j1 < len(m.BrRoute.BrPaths) {
1027 v1 = m.BrRoute.BrPaths[j1]
1029 buf.EncodeUint32(uint32(v1.SwIfIndex))
1030 buf.EncodeUint32(uint32(v1.TableID))
1031 buf.EncodeUint32(uint32(v1.RpfID))
1032 buf.EncodeUint8(uint8(v1.Weight))
1033 buf.EncodeUint8(uint8(v1.Preference))
1034 buf.EncodeUint32(uint32(v1.Type))
1035 buf.EncodeUint32(uint32(v1.Flags))
1036 buf.EncodeUint32(uint32(v1.Proto))
1037 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
1038 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
1039 buf.EncodeUint32(uint32(v1.Nh.ObjID))
1040 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
1041 buf.EncodeUint8(uint8(v1.NLabels))
1042 for j2 := 0; j2 < 16; j2++ {
1043 var v2 fib_types.FibMplsLabel
1044 if j2 < len(v1.LabelStack) {
1045 v2 = v1.LabelStack[j2]
1047 buf.EncodeUint8(uint8(v2.IsUniform))
1048 buf.EncodeUint32(uint32(v2.Label))
1049 buf.EncodeUint8(uint8(v2.TTL))
1050 buf.EncodeUint8(uint8(v2.Exp))
1053 return buf.Bytes(), nil
1055 func (m *BierRouteDetails) Unmarshal(b []byte) error {
1056 buf := codec.NewBuffer(b)
1057 m.BrRoute.BrBp = buf.DecodeUint32()
1058 m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
1059 m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
1060 m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
1061 m.BrRoute.BrNPaths = buf.DecodeUint8()
1062 m.BrRoute.BrPaths = make([]fib_types.FibPath, int(m.BrRoute.BrNPaths))
1063 for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
1064 m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
1065 m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
1066 m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
1067 m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
1068 m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
1069 m.BrRoute.BrPaths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1070 m.BrRoute.BrPaths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1071 m.BrRoute.BrPaths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1072 copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1073 m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
1074 m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
1075 m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1076 m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
1077 for j2 := 0; j2 < 16; j2++ {
1078 m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1079 m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1080 m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1081 m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1087 // BierRouteDump defines message 'bier_route_dump'.
1088 type BierRouteDump struct {
1089 BrTblID BierTableID `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
1092 func (m *BierRouteDump) Reset() { *m = BierRouteDump{} }
1093 func (*BierRouteDump) GetMessageName() string { return "bier_route_dump" }
1094 func (*BierRouteDump) GetCrcString() string { return "38339846" }
1095 func (*BierRouteDump) GetMessageType() api.MessageType {
1096 return api.RequestMessage
1099 func (m *BierRouteDump) Size() int {
1104 size += 1 // m.BrTblID.BtSet
1105 size += 1 // m.BrTblID.BtSubDomain
1106 size += 1 // m.BrTblID.BtHdrLenID
1109 func (m *BierRouteDump) Marshal(b []byte) ([]byte, error) {
1110 var buf *codec.Buffer
1112 buf = codec.NewBuffer(make([]byte, m.Size()))
1114 buf = codec.NewBuffer(b)
1116 buf.EncodeUint8(uint8(m.BrTblID.BtSet))
1117 buf.EncodeUint8(uint8(m.BrTblID.BtSubDomain))
1118 buf.EncodeUint8(uint8(m.BrTblID.BtHdrLenID))
1119 return buf.Bytes(), nil
1121 func (m *BierRouteDump) Unmarshal(b []byte) error {
1122 buf := codec.NewBuffer(b)
1123 m.BrTblID.BtSet = buf.DecodeUint8()
1124 m.BrTblID.BtSubDomain = buf.DecodeUint8()
1125 m.BrTblID.BtHdrLenID = buf.DecodeUint8()
1129 // BierTableAddDel defines message 'bier_table_add_del'.
1130 type BierTableAddDel struct {
1131 BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
1132 BtLabel uint32 `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
1133 BtIsAdd bool `binapi:"bool,name=bt_is_add" json:"bt_is_add,omitempty"`
1136 func (m *BierTableAddDel) Reset() { *m = BierTableAddDel{} }
1137 func (*BierTableAddDel) GetMessageName() string { return "bier_table_add_del" }
1138 func (*BierTableAddDel) GetCrcString() string { return "35e59209" }
1139 func (*BierTableAddDel) GetMessageType() api.MessageType {
1140 return api.RequestMessage
1143 func (m *BierTableAddDel) Size() int {
1148 size += 1 // m.BtTblID.BtSet
1149 size += 1 // m.BtTblID.BtSubDomain
1150 size += 1 // m.BtTblID.BtHdrLenID
1151 size += 4 // m.BtLabel
1152 size += 1 // m.BtIsAdd
1155 func (m *BierTableAddDel) Marshal(b []byte) ([]byte, error) {
1156 var buf *codec.Buffer
1158 buf = codec.NewBuffer(make([]byte, m.Size()))
1160 buf = codec.NewBuffer(b)
1162 buf.EncodeUint8(uint8(m.BtTblID.BtSet))
1163 buf.EncodeUint8(uint8(m.BtTblID.BtSubDomain))
1164 buf.EncodeUint8(uint8(m.BtTblID.BtHdrLenID))
1165 buf.EncodeUint32(uint32(m.BtLabel))
1166 buf.EncodeBool(m.BtIsAdd)
1167 return buf.Bytes(), nil
1169 func (m *BierTableAddDel) Unmarshal(b []byte) error {
1170 buf := codec.NewBuffer(b)
1171 m.BtTblID.BtSet = buf.DecodeUint8()
1172 m.BtTblID.BtSubDomain = buf.DecodeUint8()
1173 m.BtTblID.BtHdrLenID = buf.DecodeUint8()
1174 m.BtLabel = buf.DecodeUint32()
1175 m.BtIsAdd = buf.DecodeBool()
1179 // BierTableAddDelReply defines message 'bier_table_add_del_reply'.
1180 type BierTableAddDelReply struct {
1181 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1184 func (m *BierTableAddDelReply) Reset() { *m = BierTableAddDelReply{} }
1185 func (*BierTableAddDelReply) GetMessageName() string { return "bier_table_add_del_reply" }
1186 func (*BierTableAddDelReply) GetCrcString() string { return "e8d4e804" }
1187 func (*BierTableAddDelReply) GetMessageType() api.MessageType {
1188 return api.ReplyMessage
1191 func (m *BierTableAddDelReply) Size() int {
1196 size += 4 // m.Retval
1199 func (m *BierTableAddDelReply) Marshal(b []byte) ([]byte, error) {
1200 var buf *codec.Buffer
1202 buf = codec.NewBuffer(make([]byte, m.Size()))
1204 buf = codec.NewBuffer(b)
1206 buf.EncodeUint32(uint32(m.Retval))
1207 return buf.Bytes(), nil
1209 func (m *BierTableAddDelReply) Unmarshal(b []byte) error {
1210 buf := codec.NewBuffer(b)
1211 m.Retval = int32(buf.DecodeUint32())
1215 // BierTableDetails defines message 'bier_table_details'.
1216 type BierTableDetails struct {
1217 BtLabel uint32 `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
1218 BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
1221 func (m *BierTableDetails) Reset() { *m = BierTableDetails{} }
1222 func (*BierTableDetails) GetMessageName() string { return "bier_table_details" }
1223 func (*BierTableDetails) GetCrcString() string { return "fc44a9dd" }
1224 func (*BierTableDetails) GetMessageType() api.MessageType {
1225 return api.ReplyMessage
1228 func (m *BierTableDetails) Size() int {
1233 size += 4 // m.BtLabel
1234 size += 1 // m.BtTblID.BtSet
1235 size += 1 // m.BtTblID.BtSubDomain
1236 size += 1 // m.BtTblID.BtHdrLenID
1239 func (m *BierTableDetails) Marshal(b []byte) ([]byte, error) {
1240 var buf *codec.Buffer
1242 buf = codec.NewBuffer(make([]byte, m.Size()))
1244 buf = codec.NewBuffer(b)
1246 buf.EncodeUint32(uint32(m.BtLabel))
1247 buf.EncodeUint8(uint8(m.BtTblID.BtSet))
1248 buf.EncodeUint8(uint8(m.BtTblID.BtSubDomain))
1249 buf.EncodeUint8(uint8(m.BtTblID.BtHdrLenID))
1250 return buf.Bytes(), nil
1252 func (m *BierTableDetails) Unmarshal(b []byte) error {
1253 buf := codec.NewBuffer(b)
1254 m.BtLabel = buf.DecodeUint32()
1255 m.BtTblID.BtSet = buf.DecodeUint8()
1256 m.BtTblID.BtSubDomain = buf.DecodeUint8()
1257 m.BtTblID.BtHdrLenID = buf.DecodeUint8()
1261 // BierTableDump defines message 'bier_table_dump'.
1262 type BierTableDump struct{}
1264 func (m *BierTableDump) Reset() { *m = BierTableDump{} }
1265 func (*BierTableDump) GetMessageName() string { return "bier_table_dump" }
1266 func (*BierTableDump) GetCrcString() string { return "51077d14" }
1267 func (*BierTableDump) GetMessageType() api.MessageType {
1268 return api.RequestMessage
1271 func (m *BierTableDump) Size() int {
1278 func (m *BierTableDump) Marshal(b []byte) ([]byte, error) {
1279 var buf *codec.Buffer
1281 buf = codec.NewBuffer(make([]byte, m.Size()))
1283 buf = codec.NewBuffer(b)
1285 return buf.Bytes(), nil
1287 func (m *BierTableDump) Unmarshal(b []byte) error {
1291 func init() { file_bier_binapi_init() }
1292 func file_bier_binapi_init() {
1293 api.RegisterMessage((*BierDispEntryAddDel)(nil), "bier_disp_entry_add_del_648323eb")
1294 api.RegisterMessage((*BierDispEntryAddDelReply)(nil), "bier_disp_entry_add_del_reply_e8d4e804")
1295 api.RegisterMessage((*BierDispEntryDetails)(nil), "bier_disp_entry_details_e5b039a9")
1296 api.RegisterMessage((*BierDispEntryDump)(nil), "bier_disp_entry_dump_b5fa54ad")
1297 api.RegisterMessage((*BierDispTableAddDel)(nil), "bier_disp_table_add_del_889657ac")
1298 api.RegisterMessage((*BierDispTableAddDelReply)(nil), "bier_disp_table_add_del_reply_e8d4e804")
1299 api.RegisterMessage((*BierDispTableDetails)(nil), "bier_disp_table_details_d27942c0")
1300 api.RegisterMessage((*BierDispTableDump)(nil), "bier_disp_table_dump_51077d14")
1301 api.RegisterMessage((*BierImpAdd)(nil), "bier_imp_add_3856dc3d")
1302 api.RegisterMessage((*BierImpAddReply)(nil), "bier_imp_add_reply_d49c5793")
1303 api.RegisterMessage((*BierImpDel)(nil), "bier_imp_del_7d45edf6")
1304 api.RegisterMessage((*BierImpDelReply)(nil), "bier_imp_del_reply_e8d4e804")
1305 api.RegisterMessage((*BierImpDetails)(nil), "bier_imp_details_b76192df")
1306 api.RegisterMessage((*BierImpDump)(nil), "bier_imp_dump_51077d14")
1307 api.RegisterMessage((*BierRouteAddDel)(nil), "bier_route_add_del_f29edca0")
1308 api.RegisterMessage((*BierRouteAddDelReply)(nil), "bier_route_add_del_reply_e8d4e804")
1309 api.RegisterMessage((*BierRouteDetails)(nil), "bier_route_details_39ee6a56")
1310 api.RegisterMessage((*BierRouteDump)(nil), "bier_route_dump_38339846")
1311 api.RegisterMessage((*BierTableAddDel)(nil), "bier_table_add_del_35e59209")
1312 api.RegisterMessage((*BierTableAddDelReply)(nil), "bier_table_add_del_reply_e8d4e804")
1313 api.RegisterMessage((*BierTableDetails)(nil), "bier_table_details_fc44a9dd")
1314 api.RegisterMessage((*BierTableDump)(nil), "bier_table_dump_51077d14")
1317 // Messages returns list of all messages in this module.
1318 func AllMessages() []api.Message {
1319 return []api.Message{
1320 (*BierDispEntryAddDel)(nil),
1321 (*BierDispEntryAddDelReply)(nil),
1322 (*BierDispEntryDetails)(nil),
1323 (*BierDispEntryDump)(nil),
1324 (*BierDispTableAddDel)(nil),
1325 (*BierDispTableAddDelReply)(nil),
1326 (*BierDispTableDetails)(nil),
1327 (*BierDispTableDump)(nil),
1329 (*BierImpAddReply)(nil),
1331 (*BierImpDelReply)(nil),
1332 (*BierImpDetails)(nil),
1333 (*BierImpDump)(nil),
1334 (*BierRouteAddDel)(nil),
1335 (*BierRouteAddDelReply)(nil),
1336 (*BierRouteDetails)(nil),
1337 (*BierRouteDump)(nil),
1338 (*BierTableAddDel)(nil),
1339 (*BierTableAddDelReply)(nil),
1340 (*BierTableDetails)(nil),
1341 (*BierTableDump)(nil),