+// SrPoliciesWithSlIndexDetails defines message 'sr_policies_with_sl_index_details'.
+// InProgress: the message form may change in the future versions
+type SrPoliciesWithSlIndexDetails struct {
+ Bsid ip_types.IP6Address `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
+ IsSpray bool `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
+ IsEncap bool `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
+ FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
+ NumSidLists uint8 `binapi:"u8,name=num_sid_lists" json:"-"`
+ SidLists []Srv6SidListWithSlIndex `binapi:"srv6_sid_list_with_sl_index[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"`
+}
+
+func (m *SrPoliciesWithSlIndexDetails) Reset() { *m = SrPoliciesWithSlIndexDetails{} }
+func (*SrPoliciesWithSlIndexDetails) GetMessageName() string {
+ return "sr_policies_with_sl_index_details"
+}
+func (*SrPoliciesWithSlIndexDetails) GetCrcString() string { return "ca2e9bc8" }
+func (*SrPoliciesWithSlIndexDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SrPoliciesWithSlIndexDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 * 16 // m.Bsid
+ size += 1 // m.IsSpray
+ size += 1 // m.IsEncap
+ size += 4 // m.FibTable
+ size += 1 // m.NumSidLists
+ for j1 := 0; j1 < len(m.SidLists); j1++ {
+ var s1 Srv6SidListWithSlIndex
+ _ = s1
+ if j1 < len(m.SidLists) {
+ s1 = m.SidLists[j1]
+ }
+ size += 1 // s1.NumSids
+ size += 4 // s1.Weight
+ size += 4 // s1.SlIndex
+ for j2 := 0; j2 < 16; j2++ {
+ size += 1 * 16 // s1.Sids[j2]
+ }
+ }
+ return size
+}
+func (m *SrPoliciesWithSlIndexDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBytes(m.Bsid[:], 16)
+ buf.EncodeBool(m.IsSpray)
+ buf.EncodeBool(m.IsEncap)
+ buf.EncodeUint32(m.FibTable)
+ buf.EncodeUint8(uint8(len(m.SidLists)))
+ for j0 := 0; j0 < len(m.SidLists); j0++ {
+ var v0 Srv6SidListWithSlIndex // SidLists
+ if j0 < len(m.SidLists) {
+ v0 = m.SidLists[j0]
+ }
+ buf.EncodeUint8(v0.NumSids)
+ buf.EncodeUint32(v0.Weight)
+ buf.EncodeUint32(v0.SlIndex)
+ for j1 := 0; j1 < 16; j1++ {
+ buf.EncodeBytes(v0.Sids[j1][:], 16)
+ }
+ }
+ return buf.Bytes(), nil
+}
+func (m *SrPoliciesWithSlIndexDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ copy(m.Bsid[:], buf.DecodeBytes(16))
+ m.IsSpray = buf.DecodeBool()
+ m.IsEncap = buf.DecodeBool()
+ m.FibTable = buf.DecodeUint32()
+ m.NumSidLists = buf.DecodeUint8()
+ m.SidLists = make([]Srv6SidListWithSlIndex, m.NumSidLists)
+ for j0 := 0; j0 < len(m.SidLists); j0++ {
+ m.SidLists[j0].NumSids = buf.DecodeUint8()
+ m.SidLists[j0].Weight = buf.DecodeUint32()
+ m.SidLists[j0].SlIndex = buf.DecodeUint32()
+ for j1 := 0; j1 < 16; j1++ {
+ copy(m.SidLists[j0].Sids[j1][:], buf.DecodeBytes(16))
+ }
+ }
+ return nil
+}
+
+// SrPoliciesWithSlIndexDump defines message 'sr_policies_with_sl_index_dump'.
+// InProgress: the message form may change in the future versions
+type SrPoliciesWithSlIndexDump struct{}
+
+func (m *SrPoliciesWithSlIndexDump) Reset() { *m = SrPoliciesWithSlIndexDump{} }
+func (*SrPoliciesWithSlIndexDump) GetMessageName() string { return "sr_policies_with_sl_index_dump" }
+func (*SrPoliciesWithSlIndexDump) GetCrcString() string { return "51077d14" }
+func (*SrPoliciesWithSlIndexDump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SrPoliciesWithSlIndexDump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *SrPoliciesWithSlIndexDump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *SrPoliciesWithSlIndexDump) Unmarshal(b []byte) error {
+ return nil
+}
+