go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2101/sr/sr.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package sr contains generated bindings for API file sr.api.
     4  //
     5  // Contents:
     6  // -  2 structs
     7  // - 22 messages
     8  package sr
     9  
    10  import (
    11  	api "go.fd.io/govpp/api"
    12  	codec "go.fd.io/govpp/codec"
    13  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types"
    14  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ip_types"
    15  	sr_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/sr_types"
    16  )
    17  
    18  // This is a compile-time assertion to ensure that this generated file
    19  // is compatible with the GoVPP api package it is being compiled against.
    20  // A compilation error at this line likely means your copy of the
    21  // GoVPP api package needs to be updated.
    22  const _ = api.GoVppAPIPackageIsVersion2
    23  
    24  const (
    25  	APIFile    = "sr"
    26  	APIVersion = "2.0.0"
    27  	VersionCrc = 0x39711e91
    28  )
    29  
    30  // Srv6SidList defines type 'srv6_sid_list'.
    31  type Srv6SidList struct {
    32  	NumSids uint8                   `binapi:"u8,name=num_sids" json:"num_sids,omitempty"`
    33  	Weight  uint32                  `binapi:"u32,name=weight" json:"weight,omitempty"`
    34  	Sids    [16]ip_types.IP6Address `binapi:"ip6_address[16],name=sids" json:"sids,omitempty"`
    35  }
    36  
    37  // Srv6SidListWithSlIndex defines type 'srv6_sid_list_with_sl_index'.
    38  type Srv6SidListWithSlIndex struct {
    39  	NumSids uint8                   `binapi:"u8,name=num_sids" json:"num_sids,omitempty"`
    40  	Weight  uint32                  `binapi:"u32,name=weight" json:"weight,omitempty"`
    41  	SlIndex uint32                  `binapi:"u32,name=sl_index" json:"sl_index,omitempty"`
    42  	Sids    [16]ip_types.IP6Address `binapi:"ip6_address[16],name=sids" json:"sids,omitempty"`
    43  }
    44  
    45  // SrLocalsidAddDel defines message 'sr_localsid_add_del'.
    46  type SrLocalsidAddDel struct {
    47  	IsDel     bool                           `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"`
    48  	Localsid  ip_types.IP6Address            `binapi:"ip6_address,name=localsid" json:"localsid,omitempty"`
    49  	EndPsp    bool                           `binapi:"bool,name=end_psp" json:"end_psp,omitempty"`
    50  	Behavior  sr_types.SrBehavior            `binapi:"sr_behavior,name=behavior" json:"behavior,omitempty"`
    51  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
    52  	VlanIndex uint32                         `binapi:"u32,name=vlan_index" json:"vlan_index,omitempty"`
    53  	FibTable  uint32                         `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
    54  	NhAddr    ip_types.Address               `binapi:"address,name=nh_addr" json:"nh_addr,omitempty"`
    55  }
    56  
    57  func (m *SrLocalsidAddDel) Reset()               { *m = SrLocalsidAddDel{} }
    58  func (*SrLocalsidAddDel) GetMessageName() string { return "sr_localsid_add_del" }
    59  func (*SrLocalsidAddDel) GetCrcString() string   { return "26fa3309" }
    60  func (*SrLocalsidAddDel) GetMessageType() api.MessageType {
    61  	return api.RequestMessage
    62  }
    63  
    64  func (m *SrLocalsidAddDel) Size() (size int) {
    65  	if m == nil {
    66  		return 0
    67  	}
    68  	size += 1      // m.IsDel
    69  	size += 1 * 16 // m.Localsid
    70  	size += 1      // m.EndPsp
    71  	size += 1      // m.Behavior
    72  	size += 4      // m.SwIfIndex
    73  	size += 4      // m.VlanIndex
    74  	size += 4      // m.FibTable
    75  	size += 1      // m.NhAddr.Af
    76  	size += 1 * 16 // m.NhAddr.Un
    77  	return size
    78  }
    79  func (m *SrLocalsidAddDel) Marshal(b []byte) ([]byte, error) {
    80  	if b == nil {
    81  		b = make([]byte, m.Size())
    82  	}
    83  	buf := codec.NewBuffer(b)
    84  	buf.EncodeBool(m.IsDel)
    85  	buf.EncodeBytes(m.Localsid[:], 16)
    86  	buf.EncodeBool(m.EndPsp)
    87  	buf.EncodeUint8(uint8(m.Behavior))
    88  	buf.EncodeUint32(uint32(m.SwIfIndex))
    89  	buf.EncodeUint32(m.VlanIndex)
    90  	buf.EncodeUint32(m.FibTable)
    91  	buf.EncodeUint8(uint8(m.NhAddr.Af))
    92  	buf.EncodeBytes(m.NhAddr.Un.XXX_UnionData[:], 16)
    93  	return buf.Bytes(), nil
    94  }
    95  func (m *SrLocalsidAddDel) Unmarshal(b []byte) error {
    96  	buf := codec.NewBuffer(b)
    97  	m.IsDel = buf.DecodeBool()
    98  	copy(m.Localsid[:], buf.DecodeBytes(16))
    99  	m.EndPsp = buf.DecodeBool()
   100  	m.Behavior = sr_types.SrBehavior(buf.DecodeUint8())
   101  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   102  	m.VlanIndex = buf.DecodeUint32()
   103  	m.FibTable = buf.DecodeUint32()
   104  	m.NhAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
   105  	copy(m.NhAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   106  	return nil
   107  }
   108  
   109  // SrLocalsidAddDelReply defines message 'sr_localsid_add_del_reply'.
   110  type SrLocalsidAddDelReply struct {
   111  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   112  }
   113  
   114  func (m *SrLocalsidAddDelReply) Reset()               { *m = SrLocalsidAddDelReply{} }
   115  func (*SrLocalsidAddDelReply) GetMessageName() string { return "sr_localsid_add_del_reply" }
   116  func (*SrLocalsidAddDelReply) GetCrcString() string   { return "e8d4e804" }
   117  func (*SrLocalsidAddDelReply) GetMessageType() api.MessageType {
   118  	return api.ReplyMessage
   119  }
   120  
   121  func (m *SrLocalsidAddDelReply) Size() (size int) {
   122  	if m == nil {
   123  		return 0
   124  	}
   125  	size += 4 // m.Retval
   126  	return size
   127  }
   128  func (m *SrLocalsidAddDelReply) Marshal(b []byte) ([]byte, error) {
   129  	if b == nil {
   130  		b = make([]byte, m.Size())
   131  	}
   132  	buf := codec.NewBuffer(b)
   133  	buf.EncodeInt32(m.Retval)
   134  	return buf.Bytes(), nil
   135  }
   136  func (m *SrLocalsidAddDelReply) Unmarshal(b []byte) error {
   137  	buf := codec.NewBuffer(b)
   138  	m.Retval = buf.DecodeInt32()
   139  	return nil
   140  }
   141  
   142  // SrLocalsidsDetails defines message 'sr_localsids_details'.
   143  type SrLocalsidsDetails struct {
   144  	Addr                    ip_types.IP6Address `binapi:"ip6_address,name=addr" json:"addr,omitempty"`
   145  	EndPsp                  bool                `binapi:"bool,name=end_psp" json:"end_psp,omitempty"`
   146  	Behavior                sr_types.SrBehavior `binapi:"sr_behavior,name=behavior" json:"behavior,omitempty"`
   147  	FibTable                uint32              `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   148  	VlanIndex               uint32              `binapi:"u32,name=vlan_index" json:"vlan_index,omitempty"`
   149  	XconnectNhAddr          ip_types.Address    `binapi:"address,name=xconnect_nh_addr" json:"xconnect_nh_addr,omitempty"`
   150  	XconnectIfaceOrVrfTable uint32              `binapi:"u32,name=xconnect_iface_or_vrf_table" json:"xconnect_iface_or_vrf_table,omitempty"`
   151  }
   152  
   153  func (m *SrLocalsidsDetails) Reset()               { *m = SrLocalsidsDetails{} }
   154  func (*SrLocalsidsDetails) GetMessageName() string { return "sr_localsids_details" }
   155  func (*SrLocalsidsDetails) GetCrcString() string   { return "6a6c0265" }
   156  func (*SrLocalsidsDetails) GetMessageType() api.MessageType {
   157  	return api.ReplyMessage
   158  }
   159  
   160  func (m *SrLocalsidsDetails) Size() (size int) {
   161  	if m == nil {
   162  		return 0
   163  	}
   164  	size += 1 * 16 // m.Addr
   165  	size += 1      // m.EndPsp
   166  	size += 1      // m.Behavior
   167  	size += 4      // m.FibTable
   168  	size += 4      // m.VlanIndex
   169  	size += 1      // m.XconnectNhAddr.Af
   170  	size += 1 * 16 // m.XconnectNhAddr.Un
   171  	size += 4      // m.XconnectIfaceOrVrfTable
   172  	return size
   173  }
   174  func (m *SrLocalsidsDetails) Marshal(b []byte) ([]byte, error) {
   175  	if b == nil {
   176  		b = make([]byte, m.Size())
   177  	}
   178  	buf := codec.NewBuffer(b)
   179  	buf.EncodeBytes(m.Addr[:], 16)
   180  	buf.EncodeBool(m.EndPsp)
   181  	buf.EncodeUint8(uint8(m.Behavior))
   182  	buf.EncodeUint32(m.FibTable)
   183  	buf.EncodeUint32(m.VlanIndex)
   184  	buf.EncodeUint8(uint8(m.XconnectNhAddr.Af))
   185  	buf.EncodeBytes(m.XconnectNhAddr.Un.XXX_UnionData[:], 16)
   186  	buf.EncodeUint32(m.XconnectIfaceOrVrfTable)
   187  	return buf.Bytes(), nil
   188  }
   189  func (m *SrLocalsidsDetails) Unmarshal(b []byte) error {
   190  	buf := codec.NewBuffer(b)
   191  	copy(m.Addr[:], buf.DecodeBytes(16))
   192  	m.EndPsp = buf.DecodeBool()
   193  	m.Behavior = sr_types.SrBehavior(buf.DecodeUint8())
   194  	m.FibTable = buf.DecodeUint32()
   195  	m.VlanIndex = buf.DecodeUint32()
   196  	m.XconnectNhAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
   197  	copy(m.XconnectNhAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   198  	m.XconnectIfaceOrVrfTable = buf.DecodeUint32()
   199  	return nil
   200  }
   201  
   202  // SrLocalsidsDump defines message 'sr_localsids_dump'.
   203  type SrLocalsidsDump struct{}
   204  
   205  func (m *SrLocalsidsDump) Reset()               { *m = SrLocalsidsDump{} }
   206  func (*SrLocalsidsDump) GetMessageName() string { return "sr_localsids_dump" }
   207  func (*SrLocalsidsDump) GetCrcString() string   { return "51077d14" }
   208  func (*SrLocalsidsDump) GetMessageType() api.MessageType {
   209  	return api.RequestMessage
   210  }
   211  
   212  func (m *SrLocalsidsDump) Size() (size int) {
   213  	if m == nil {
   214  		return 0
   215  	}
   216  	return size
   217  }
   218  func (m *SrLocalsidsDump) Marshal(b []byte) ([]byte, error) {
   219  	if b == nil {
   220  		b = make([]byte, m.Size())
   221  	}
   222  	buf := codec.NewBuffer(b)
   223  	return buf.Bytes(), nil
   224  }
   225  func (m *SrLocalsidsDump) Unmarshal(b []byte) error {
   226  	return nil
   227  }
   228  
   229  // SrPoliciesDetails defines message 'sr_policies_details'.
   230  type SrPoliciesDetails struct {
   231  	Bsid        ip_types.IP6Address `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
   232  	IsSpray     bool                `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
   233  	IsEncap     bool                `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
   234  	FibTable    uint32              `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   235  	NumSidLists uint8               `binapi:"u8,name=num_sid_lists" json:"-"`
   236  	SidLists    []Srv6SidList       `binapi:"srv6_sid_list[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"`
   237  }
   238  
   239  func (m *SrPoliciesDetails) Reset()               { *m = SrPoliciesDetails{} }
   240  func (*SrPoliciesDetails) GetMessageName() string { return "sr_policies_details" }
   241  func (*SrPoliciesDetails) GetCrcString() string   { return "07ec2d93" }
   242  func (*SrPoliciesDetails) GetMessageType() api.MessageType {
   243  	return api.ReplyMessage
   244  }
   245  
   246  func (m *SrPoliciesDetails) Size() (size int) {
   247  	if m == nil {
   248  		return 0
   249  	}
   250  	size += 1 * 16 // m.Bsid
   251  	size += 1      // m.IsSpray
   252  	size += 1      // m.IsEncap
   253  	size += 4      // m.FibTable
   254  	size += 1      // m.NumSidLists
   255  	for j1 := 0; j1 < len(m.SidLists); j1++ {
   256  		var s1 Srv6SidList
   257  		_ = s1
   258  		if j1 < len(m.SidLists) {
   259  			s1 = m.SidLists[j1]
   260  		}
   261  		size += 1 // s1.NumSids
   262  		size += 4 // s1.Weight
   263  		for j2 := 0; j2 < 16; j2++ {
   264  			size += 1 * 16 // s1.Sids[j2]
   265  		}
   266  	}
   267  	return size
   268  }
   269  func (m *SrPoliciesDetails) Marshal(b []byte) ([]byte, error) {
   270  	if b == nil {
   271  		b = make([]byte, m.Size())
   272  	}
   273  	buf := codec.NewBuffer(b)
   274  	buf.EncodeBytes(m.Bsid[:], 16)
   275  	buf.EncodeBool(m.IsSpray)
   276  	buf.EncodeBool(m.IsEncap)
   277  	buf.EncodeUint32(m.FibTable)
   278  	buf.EncodeUint8(uint8(len(m.SidLists)))
   279  	for j0 := 0; j0 < len(m.SidLists); j0++ {
   280  		var v0 Srv6SidList // SidLists
   281  		if j0 < len(m.SidLists) {
   282  			v0 = m.SidLists[j0]
   283  		}
   284  		buf.EncodeUint8(v0.NumSids)
   285  		buf.EncodeUint32(v0.Weight)
   286  		for j1 := 0; j1 < 16; j1++ {
   287  			buf.EncodeBytes(v0.Sids[j1][:], 16)
   288  		}
   289  	}
   290  	return buf.Bytes(), nil
   291  }
   292  func (m *SrPoliciesDetails) Unmarshal(b []byte) error {
   293  	buf := codec.NewBuffer(b)
   294  	copy(m.Bsid[:], buf.DecodeBytes(16))
   295  	m.IsSpray = buf.DecodeBool()
   296  	m.IsEncap = buf.DecodeBool()
   297  	m.FibTable = buf.DecodeUint32()
   298  	m.NumSidLists = buf.DecodeUint8()
   299  	m.SidLists = make([]Srv6SidList, m.NumSidLists)
   300  	for j0 := 0; j0 < len(m.SidLists); j0++ {
   301  		m.SidLists[j0].NumSids = buf.DecodeUint8()
   302  		m.SidLists[j0].Weight = buf.DecodeUint32()
   303  		for j1 := 0; j1 < 16; j1++ {
   304  			copy(m.SidLists[j0].Sids[j1][:], buf.DecodeBytes(16))
   305  		}
   306  	}
   307  	return nil
   308  }
   309  
   310  // SrPoliciesDump defines message 'sr_policies_dump'.
   311  type SrPoliciesDump struct{}
   312  
   313  func (m *SrPoliciesDump) Reset()               { *m = SrPoliciesDump{} }
   314  func (*SrPoliciesDump) GetMessageName() string { return "sr_policies_dump" }
   315  func (*SrPoliciesDump) GetCrcString() string   { return "51077d14" }
   316  func (*SrPoliciesDump) GetMessageType() api.MessageType {
   317  	return api.RequestMessage
   318  }
   319  
   320  func (m *SrPoliciesDump) Size() (size int) {
   321  	if m == nil {
   322  		return 0
   323  	}
   324  	return size
   325  }
   326  func (m *SrPoliciesDump) Marshal(b []byte) ([]byte, error) {
   327  	if b == nil {
   328  		b = make([]byte, m.Size())
   329  	}
   330  	buf := codec.NewBuffer(b)
   331  	return buf.Bytes(), nil
   332  }
   333  func (m *SrPoliciesDump) Unmarshal(b []byte) error {
   334  	return nil
   335  }
   336  
   337  // SrPoliciesWithSlIndexDetails defines message 'sr_policies_with_sl_index_details'.
   338  type SrPoliciesWithSlIndexDetails struct {
   339  	Bsid        ip_types.IP6Address      `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
   340  	IsSpray     bool                     `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
   341  	IsEncap     bool                     `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
   342  	FibTable    uint32                   `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   343  	NumSidLists uint8                    `binapi:"u8,name=num_sid_lists" json:"-"`
   344  	SidLists    []Srv6SidListWithSlIndex `binapi:"srv6_sid_list_with_sl_index[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"`
   345  }
   346  
   347  func (m *SrPoliciesWithSlIndexDetails) Reset() { *m = SrPoliciesWithSlIndexDetails{} }
   348  func (*SrPoliciesWithSlIndexDetails) GetMessageName() string {
   349  	return "sr_policies_with_sl_index_details"
   350  }
   351  func (*SrPoliciesWithSlIndexDetails) GetCrcString() string { return "ca2e9bc8" }
   352  func (*SrPoliciesWithSlIndexDetails) GetMessageType() api.MessageType {
   353  	return api.ReplyMessage
   354  }
   355  
   356  func (m *SrPoliciesWithSlIndexDetails) Size() (size int) {
   357  	if m == nil {
   358  		return 0
   359  	}
   360  	size += 1 * 16 // m.Bsid
   361  	size += 1      // m.IsSpray
   362  	size += 1      // m.IsEncap
   363  	size += 4      // m.FibTable
   364  	size += 1      // m.NumSidLists
   365  	for j1 := 0; j1 < len(m.SidLists); j1++ {
   366  		var s1 Srv6SidListWithSlIndex
   367  		_ = s1
   368  		if j1 < len(m.SidLists) {
   369  			s1 = m.SidLists[j1]
   370  		}
   371  		size += 1 // s1.NumSids
   372  		size += 4 // s1.Weight
   373  		size += 4 // s1.SlIndex
   374  		for j2 := 0; j2 < 16; j2++ {
   375  			size += 1 * 16 // s1.Sids[j2]
   376  		}
   377  	}
   378  	return size
   379  }
   380  func (m *SrPoliciesWithSlIndexDetails) Marshal(b []byte) ([]byte, error) {
   381  	if b == nil {
   382  		b = make([]byte, m.Size())
   383  	}
   384  	buf := codec.NewBuffer(b)
   385  	buf.EncodeBytes(m.Bsid[:], 16)
   386  	buf.EncodeBool(m.IsSpray)
   387  	buf.EncodeBool(m.IsEncap)
   388  	buf.EncodeUint32(m.FibTable)
   389  	buf.EncodeUint8(uint8(len(m.SidLists)))
   390  	for j0 := 0; j0 < len(m.SidLists); j0++ {
   391  		var v0 Srv6SidListWithSlIndex // SidLists
   392  		if j0 < len(m.SidLists) {
   393  			v0 = m.SidLists[j0]
   394  		}
   395  		buf.EncodeUint8(v0.NumSids)
   396  		buf.EncodeUint32(v0.Weight)
   397  		buf.EncodeUint32(v0.SlIndex)
   398  		for j1 := 0; j1 < 16; j1++ {
   399  			buf.EncodeBytes(v0.Sids[j1][:], 16)
   400  		}
   401  	}
   402  	return buf.Bytes(), nil
   403  }
   404  func (m *SrPoliciesWithSlIndexDetails) Unmarshal(b []byte) error {
   405  	buf := codec.NewBuffer(b)
   406  	copy(m.Bsid[:], buf.DecodeBytes(16))
   407  	m.IsSpray = buf.DecodeBool()
   408  	m.IsEncap = buf.DecodeBool()
   409  	m.FibTable = buf.DecodeUint32()
   410  	m.NumSidLists = buf.DecodeUint8()
   411  	m.SidLists = make([]Srv6SidListWithSlIndex, m.NumSidLists)
   412  	for j0 := 0; j0 < len(m.SidLists); j0++ {
   413  		m.SidLists[j0].NumSids = buf.DecodeUint8()
   414  		m.SidLists[j0].Weight = buf.DecodeUint32()
   415  		m.SidLists[j0].SlIndex = buf.DecodeUint32()
   416  		for j1 := 0; j1 < 16; j1++ {
   417  			copy(m.SidLists[j0].Sids[j1][:], buf.DecodeBytes(16))
   418  		}
   419  	}
   420  	return nil
   421  }
   422  
   423  // SrPoliciesWithSlIndexDump defines message 'sr_policies_with_sl_index_dump'.
   424  type SrPoliciesWithSlIndexDump struct{}
   425  
   426  func (m *SrPoliciesWithSlIndexDump) Reset()               { *m = SrPoliciesWithSlIndexDump{} }
   427  func (*SrPoliciesWithSlIndexDump) GetMessageName() string { return "sr_policies_with_sl_index_dump" }
   428  func (*SrPoliciesWithSlIndexDump) GetCrcString() string   { return "51077d14" }
   429  func (*SrPoliciesWithSlIndexDump) GetMessageType() api.MessageType {
   430  	return api.RequestMessage
   431  }
   432  
   433  func (m *SrPoliciesWithSlIndexDump) Size() (size int) {
   434  	if m == nil {
   435  		return 0
   436  	}
   437  	return size
   438  }
   439  func (m *SrPoliciesWithSlIndexDump) Marshal(b []byte) ([]byte, error) {
   440  	if b == nil {
   441  		b = make([]byte, m.Size())
   442  	}
   443  	buf := codec.NewBuffer(b)
   444  	return buf.Bytes(), nil
   445  }
   446  func (m *SrPoliciesWithSlIndexDump) Unmarshal(b []byte) error {
   447  	return nil
   448  }
   449  
   450  // SrPolicyAdd defines message 'sr_policy_add'.
   451  type SrPolicyAdd struct {
   452  	BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   453  	Weight   uint32              `binapi:"u32,name=weight" json:"weight,omitempty"`
   454  	IsEncap  bool                `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
   455  	IsSpray  bool                `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
   456  	FibTable uint32              `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   457  	Sids     Srv6SidList         `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
   458  }
   459  
   460  func (m *SrPolicyAdd) Reset()               { *m = SrPolicyAdd{} }
   461  func (*SrPolicyAdd) GetMessageName() string { return "sr_policy_add" }
   462  func (*SrPolicyAdd) GetCrcString() string   { return "ec79ee6a" }
   463  func (*SrPolicyAdd) GetMessageType() api.MessageType {
   464  	return api.RequestMessage
   465  }
   466  
   467  func (m *SrPolicyAdd) Size() (size int) {
   468  	if m == nil {
   469  		return 0
   470  	}
   471  	size += 1 * 16 // m.BsidAddr
   472  	size += 4      // m.Weight
   473  	size += 1      // m.IsEncap
   474  	size += 1      // m.IsSpray
   475  	size += 4      // m.FibTable
   476  	size += 1      // m.Sids.NumSids
   477  	size += 4      // m.Sids.Weight
   478  	for j2 := 0; j2 < 16; j2++ {
   479  		size += 1 * 16 // m.Sids.Sids[j2]
   480  	}
   481  	return size
   482  }
   483  func (m *SrPolicyAdd) Marshal(b []byte) ([]byte, error) {
   484  	if b == nil {
   485  		b = make([]byte, m.Size())
   486  	}
   487  	buf := codec.NewBuffer(b)
   488  	buf.EncodeBytes(m.BsidAddr[:], 16)
   489  	buf.EncodeUint32(m.Weight)
   490  	buf.EncodeBool(m.IsEncap)
   491  	buf.EncodeBool(m.IsSpray)
   492  	buf.EncodeUint32(m.FibTable)
   493  	buf.EncodeUint8(m.Sids.NumSids)
   494  	buf.EncodeUint32(m.Sids.Weight)
   495  	for j1 := 0; j1 < 16; j1++ {
   496  		buf.EncodeBytes(m.Sids.Sids[j1][:], 16)
   497  	}
   498  	return buf.Bytes(), nil
   499  }
   500  func (m *SrPolicyAdd) Unmarshal(b []byte) error {
   501  	buf := codec.NewBuffer(b)
   502  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   503  	m.Weight = buf.DecodeUint32()
   504  	m.IsEncap = buf.DecodeBool()
   505  	m.IsSpray = buf.DecodeBool()
   506  	m.FibTable = buf.DecodeUint32()
   507  	m.Sids.NumSids = buf.DecodeUint8()
   508  	m.Sids.Weight = buf.DecodeUint32()
   509  	for j1 := 0; j1 < 16; j1++ {
   510  		copy(m.Sids.Sids[j1][:], buf.DecodeBytes(16))
   511  	}
   512  	return nil
   513  }
   514  
   515  // SrPolicyAddReply defines message 'sr_policy_add_reply'.
   516  type SrPolicyAddReply struct {
   517  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   518  }
   519  
   520  func (m *SrPolicyAddReply) Reset()               { *m = SrPolicyAddReply{} }
   521  func (*SrPolicyAddReply) GetMessageName() string { return "sr_policy_add_reply" }
   522  func (*SrPolicyAddReply) GetCrcString() string   { return "e8d4e804" }
   523  func (*SrPolicyAddReply) GetMessageType() api.MessageType {
   524  	return api.ReplyMessage
   525  }
   526  
   527  func (m *SrPolicyAddReply) Size() (size int) {
   528  	if m == nil {
   529  		return 0
   530  	}
   531  	size += 4 // m.Retval
   532  	return size
   533  }
   534  func (m *SrPolicyAddReply) Marshal(b []byte) ([]byte, error) {
   535  	if b == nil {
   536  		b = make([]byte, m.Size())
   537  	}
   538  	buf := codec.NewBuffer(b)
   539  	buf.EncodeInt32(m.Retval)
   540  	return buf.Bytes(), nil
   541  }
   542  func (m *SrPolicyAddReply) Unmarshal(b []byte) error {
   543  	buf := codec.NewBuffer(b)
   544  	m.Retval = buf.DecodeInt32()
   545  	return nil
   546  }
   547  
   548  // SrPolicyDel defines message 'sr_policy_del'.
   549  type SrPolicyDel struct {
   550  	BsidAddr      ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   551  	SrPolicyIndex uint32              `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
   552  }
   553  
   554  func (m *SrPolicyDel) Reset()               { *m = SrPolicyDel{} }
   555  func (*SrPolicyDel) GetMessageName() string { return "sr_policy_del" }
   556  func (*SrPolicyDel) GetCrcString() string   { return "cb4d48d5" }
   557  func (*SrPolicyDel) GetMessageType() api.MessageType {
   558  	return api.RequestMessage
   559  }
   560  
   561  func (m *SrPolicyDel) Size() (size int) {
   562  	if m == nil {
   563  		return 0
   564  	}
   565  	size += 1 * 16 // m.BsidAddr
   566  	size += 4      // m.SrPolicyIndex
   567  	return size
   568  }
   569  func (m *SrPolicyDel) Marshal(b []byte) ([]byte, error) {
   570  	if b == nil {
   571  		b = make([]byte, m.Size())
   572  	}
   573  	buf := codec.NewBuffer(b)
   574  	buf.EncodeBytes(m.BsidAddr[:], 16)
   575  	buf.EncodeUint32(m.SrPolicyIndex)
   576  	return buf.Bytes(), nil
   577  }
   578  func (m *SrPolicyDel) Unmarshal(b []byte) error {
   579  	buf := codec.NewBuffer(b)
   580  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   581  	m.SrPolicyIndex = buf.DecodeUint32()
   582  	return nil
   583  }
   584  
   585  // SrPolicyDelReply defines message 'sr_policy_del_reply'.
   586  type SrPolicyDelReply struct {
   587  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   588  }
   589  
   590  func (m *SrPolicyDelReply) Reset()               { *m = SrPolicyDelReply{} }
   591  func (*SrPolicyDelReply) GetMessageName() string { return "sr_policy_del_reply" }
   592  func (*SrPolicyDelReply) GetCrcString() string   { return "e8d4e804" }
   593  func (*SrPolicyDelReply) GetMessageType() api.MessageType {
   594  	return api.ReplyMessage
   595  }
   596  
   597  func (m *SrPolicyDelReply) Size() (size int) {
   598  	if m == nil {
   599  		return 0
   600  	}
   601  	size += 4 // m.Retval
   602  	return size
   603  }
   604  func (m *SrPolicyDelReply) Marshal(b []byte) ([]byte, error) {
   605  	if b == nil {
   606  		b = make([]byte, m.Size())
   607  	}
   608  	buf := codec.NewBuffer(b)
   609  	buf.EncodeInt32(m.Retval)
   610  	return buf.Bytes(), nil
   611  }
   612  func (m *SrPolicyDelReply) Unmarshal(b []byte) error {
   613  	buf := codec.NewBuffer(b)
   614  	m.Retval = buf.DecodeInt32()
   615  	return nil
   616  }
   617  
   618  // SrPolicyMod defines message 'sr_policy_mod'.
   619  type SrPolicyMod struct {
   620  	BsidAddr      ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   621  	SrPolicyIndex uint32              `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
   622  	FibTable      uint32              `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   623  	Operation     sr_types.SrPolicyOp `binapi:"sr_policy_op,name=operation" json:"operation,omitempty"`
   624  	SlIndex       uint32              `binapi:"u32,name=sl_index" json:"sl_index,omitempty"`
   625  	Weight        uint32              `binapi:"u32,name=weight" json:"weight,omitempty"`
   626  	Sids          Srv6SidList         `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
   627  }
   628  
   629  func (m *SrPolicyMod) Reset()               { *m = SrPolicyMod{} }
   630  func (*SrPolicyMod) GetMessageName() string { return "sr_policy_mod" }
   631  func (*SrPolicyMod) GetCrcString() string   { return "e531a102" }
   632  func (*SrPolicyMod) GetMessageType() api.MessageType {
   633  	return api.RequestMessage
   634  }
   635  
   636  func (m *SrPolicyMod) Size() (size int) {
   637  	if m == nil {
   638  		return 0
   639  	}
   640  	size += 1 * 16 // m.BsidAddr
   641  	size += 4      // m.SrPolicyIndex
   642  	size += 4      // m.FibTable
   643  	size += 1      // m.Operation
   644  	size += 4      // m.SlIndex
   645  	size += 4      // m.Weight
   646  	size += 1      // m.Sids.NumSids
   647  	size += 4      // m.Sids.Weight
   648  	for j2 := 0; j2 < 16; j2++ {
   649  		size += 1 * 16 // m.Sids.Sids[j2]
   650  	}
   651  	return size
   652  }
   653  func (m *SrPolicyMod) Marshal(b []byte) ([]byte, error) {
   654  	if b == nil {
   655  		b = make([]byte, m.Size())
   656  	}
   657  	buf := codec.NewBuffer(b)
   658  	buf.EncodeBytes(m.BsidAddr[:], 16)
   659  	buf.EncodeUint32(m.SrPolicyIndex)
   660  	buf.EncodeUint32(m.FibTable)
   661  	buf.EncodeUint8(uint8(m.Operation))
   662  	buf.EncodeUint32(m.SlIndex)
   663  	buf.EncodeUint32(m.Weight)
   664  	buf.EncodeUint8(m.Sids.NumSids)
   665  	buf.EncodeUint32(m.Sids.Weight)
   666  	for j1 := 0; j1 < 16; j1++ {
   667  		buf.EncodeBytes(m.Sids.Sids[j1][:], 16)
   668  	}
   669  	return buf.Bytes(), nil
   670  }
   671  func (m *SrPolicyMod) Unmarshal(b []byte) error {
   672  	buf := codec.NewBuffer(b)
   673  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   674  	m.SrPolicyIndex = buf.DecodeUint32()
   675  	m.FibTable = buf.DecodeUint32()
   676  	m.Operation = sr_types.SrPolicyOp(buf.DecodeUint8())
   677  	m.SlIndex = buf.DecodeUint32()
   678  	m.Weight = buf.DecodeUint32()
   679  	m.Sids.NumSids = buf.DecodeUint8()
   680  	m.Sids.Weight = buf.DecodeUint32()
   681  	for j1 := 0; j1 < 16; j1++ {
   682  		copy(m.Sids.Sids[j1][:], buf.DecodeBytes(16))
   683  	}
   684  	return nil
   685  }
   686  
   687  // SrPolicyModReply defines message 'sr_policy_mod_reply'.
   688  type SrPolicyModReply struct {
   689  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   690  }
   691  
   692  func (m *SrPolicyModReply) Reset()               { *m = SrPolicyModReply{} }
   693  func (*SrPolicyModReply) GetMessageName() string { return "sr_policy_mod_reply" }
   694  func (*SrPolicyModReply) GetCrcString() string   { return "e8d4e804" }
   695  func (*SrPolicyModReply) GetMessageType() api.MessageType {
   696  	return api.ReplyMessage
   697  }
   698  
   699  func (m *SrPolicyModReply) Size() (size int) {
   700  	if m == nil {
   701  		return 0
   702  	}
   703  	size += 4 // m.Retval
   704  	return size
   705  }
   706  func (m *SrPolicyModReply) Marshal(b []byte) ([]byte, error) {
   707  	if b == nil {
   708  		b = make([]byte, m.Size())
   709  	}
   710  	buf := codec.NewBuffer(b)
   711  	buf.EncodeInt32(m.Retval)
   712  	return buf.Bytes(), nil
   713  }
   714  func (m *SrPolicyModReply) Unmarshal(b []byte) error {
   715  	buf := codec.NewBuffer(b)
   716  	m.Retval = buf.DecodeInt32()
   717  	return nil
   718  }
   719  
   720  // SrSetEncapHopLimit defines message 'sr_set_encap_hop_limit'.
   721  type SrSetEncapHopLimit struct {
   722  	HopLimit uint8 `binapi:"u8,name=hop_limit" json:"hop_limit,omitempty"`
   723  }
   724  
   725  func (m *SrSetEncapHopLimit) Reset()               { *m = SrSetEncapHopLimit{} }
   726  func (*SrSetEncapHopLimit) GetMessageName() string { return "sr_set_encap_hop_limit" }
   727  func (*SrSetEncapHopLimit) GetCrcString() string   { return "aa75d7d0" }
   728  func (*SrSetEncapHopLimit) GetMessageType() api.MessageType {
   729  	return api.RequestMessage
   730  }
   731  
   732  func (m *SrSetEncapHopLimit) Size() (size int) {
   733  	if m == nil {
   734  		return 0
   735  	}
   736  	size += 1 // m.HopLimit
   737  	return size
   738  }
   739  func (m *SrSetEncapHopLimit) Marshal(b []byte) ([]byte, error) {
   740  	if b == nil {
   741  		b = make([]byte, m.Size())
   742  	}
   743  	buf := codec.NewBuffer(b)
   744  	buf.EncodeUint8(m.HopLimit)
   745  	return buf.Bytes(), nil
   746  }
   747  func (m *SrSetEncapHopLimit) Unmarshal(b []byte) error {
   748  	buf := codec.NewBuffer(b)
   749  	m.HopLimit = buf.DecodeUint8()
   750  	return nil
   751  }
   752  
   753  // SrSetEncapHopLimitReply defines message 'sr_set_encap_hop_limit_reply'.
   754  type SrSetEncapHopLimitReply struct {
   755  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   756  }
   757  
   758  func (m *SrSetEncapHopLimitReply) Reset()               { *m = SrSetEncapHopLimitReply{} }
   759  func (*SrSetEncapHopLimitReply) GetMessageName() string { return "sr_set_encap_hop_limit_reply" }
   760  func (*SrSetEncapHopLimitReply) GetCrcString() string   { return "e8d4e804" }
   761  func (*SrSetEncapHopLimitReply) GetMessageType() api.MessageType {
   762  	return api.ReplyMessage
   763  }
   764  
   765  func (m *SrSetEncapHopLimitReply) Size() (size int) {
   766  	if m == nil {
   767  		return 0
   768  	}
   769  	size += 4 // m.Retval
   770  	return size
   771  }
   772  func (m *SrSetEncapHopLimitReply) Marshal(b []byte) ([]byte, error) {
   773  	if b == nil {
   774  		b = make([]byte, m.Size())
   775  	}
   776  	buf := codec.NewBuffer(b)
   777  	buf.EncodeInt32(m.Retval)
   778  	return buf.Bytes(), nil
   779  }
   780  func (m *SrSetEncapHopLimitReply) Unmarshal(b []byte) error {
   781  	buf := codec.NewBuffer(b)
   782  	m.Retval = buf.DecodeInt32()
   783  	return nil
   784  }
   785  
   786  // SrSetEncapSource defines message 'sr_set_encap_source'.
   787  type SrSetEncapSource struct {
   788  	EncapsSource ip_types.IP6Address `binapi:"ip6_address,name=encaps_source" json:"encaps_source,omitempty"`
   789  }
   790  
   791  func (m *SrSetEncapSource) Reset()               { *m = SrSetEncapSource{} }
   792  func (*SrSetEncapSource) GetMessageName() string { return "sr_set_encap_source" }
   793  func (*SrSetEncapSource) GetCrcString() string   { return "d3bad5e1" }
   794  func (*SrSetEncapSource) GetMessageType() api.MessageType {
   795  	return api.RequestMessage
   796  }
   797  
   798  func (m *SrSetEncapSource) Size() (size int) {
   799  	if m == nil {
   800  		return 0
   801  	}
   802  	size += 1 * 16 // m.EncapsSource
   803  	return size
   804  }
   805  func (m *SrSetEncapSource) Marshal(b []byte) ([]byte, error) {
   806  	if b == nil {
   807  		b = make([]byte, m.Size())
   808  	}
   809  	buf := codec.NewBuffer(b)
   810  	buf.EncodeBytes(m.EncapsSource[:], 16)
   811  	return buf.Bytes(), nil
   812  }
   813  func (m *SrSetEncapSource) Unmarshal(b []byte) error {
   814  	buf := codec.NewBuffer(b)
   815  	copy(m.EncapsSource[:], buf.DecodeBytes(16))
   816  	return nil
   817  }
   818  
   819  // SrSetEncapSourceReply defines message 'sr_set_encap_source_reply'.
   820  type SrSetEncapSourceReply struct {
   821  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   822  }
   823  
   824  func (m *SrSetEncapSourceReply) Reset()               { *m = SrSetEncapSourceReply{} }
   825  func (*SrSetEncapSourceReply) GetMessageName() string { return "sr_set_encap_source_reply" }
   826  func (*SrSetEncapSourceReply) GetCrcString() string   { return "e8d4e804" }
   827  func (*SrSetEncapSourceReply) GetMessageType() api.MessageType {
   828  	return api.ReplyMessage
   829  }
   830  
   831  func (m *SrSetEncapSourceReply) Size() (size int) {
   832  	if m == nil {
   833  		return 0
   834  	}
   835  	size += 4 // m.Retval
   836  	return size
   837  }
   838  func (m *SrSetEncapSourceReply) Marshal(b []byte) ([]byte, error) {
   839  	if b == nil {
   840  		b = make([]byte, m.Size())
   841  	}
   842  	buf := codec.NewBuffer(b)
   843  	buf.EncodeInt32(m.Retval)
   844  	return buf.Bytes(), nil
   845  }
   846  func (m *SrSetEncapSourceReply) Unmarshal(b []byte) error {
   847  	buf := codec.NewBuffer(b)
   848  	m.Retval = buf.DecodeInt32()
   849  	return nil
   850  }
   851  
   852  // SrSteeringAddDel defines message 'sr_steering_add_del'.
   853  type SrSteeringAddDel struct {
   854  	IsDel         bool                           `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"`
   855  	BsidAddr      ip_types.IP6Address            `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   856  	SrPolicyIndex uint32                         `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
   857  	TableID       uint32                         `binapi:"u32,name=table_id" json:"table_id,omitempty"`
   858  	Prefix        ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
   859  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   860  	TrafficType   sr_types.SrSteer               `binapi:"sr_steer,name=traffic_type" json:"traffic_type,omitempty"`
   861  }
   862  
   863  func (m *SrSteeringAddDel) Reset()               { *m = SrSteeringAddDel{} }
   864  func (*SrSteeringAddDel) GetMessageName() string { return "sr_steering_add_del" }
   865  func (*SrSteeringAddDel) GetCrcString() string   { return "3711dace" }
   866  func (*SrSteeringAddDel) GetMessageType() api.MessageType {
   867  	return api.RequestMessage
   868  }
   869  
   870  func (m *SrSteeringAddDel) Size() (size int) {
   871  	if m == nil {
   872  		return 0
   873  	}
   874  	size += 1      // m.IsDel
   875  	size += 1 * 16 // m.BsidAddr
   876  	size += 4      // m.SrPolicyIndex
   877  	size += 4      // m.TableID
   878  	size += 1      // m.Prefix.Address.Af
   879  	size += 1 * 16 // m.Prefix.Address.Un
   880  	size += 1      // m.Prefix.Len
   881  	size += 4      // m.SwIfIndex
   882  	size += 1      // m.TrafficType
   883  	return size
   884  }
   885  func (m *SrSteeringAddDel) Marshal(b []byte) ([]byte, error) {
   886  	if b == nil {
   887  		b = make([]byte, m.Size())
   888  	}
   889  	buf := codec.NewBuffer(b)
   890  	buf.EncodeBool(m.IsDel)
   891  	buf.EncodeBytes(m.BsidAddr[:], 16)
   892  	buf.EncodeUint32(m.SrPolicyIndex)
   893  	buf.EncodeUint32(m.TableID)
   894  	buf.EncodeUint8(uint8(m.Prefix.Address.Af))
   895  	buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
   896  	buf.EncodeUint8(m.Prefix.Len)
   897  	buf.EncodeUint32(uint32(m.SwIfIndex))
   898  	buf.EncodeUint8(uint8(m.TrafficType))
   899  	return buf.Bytes(), nil
   900  }
   901  func (m *SrSteeringAddDel) Unmarshal(b []byte) error {
   902  	buf := codec.NewBuffer(b)
   903  	m.IsDel = buf.DecodeBool()
   904  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   905  	m.SrPolicyIndex = buf.DecodeUint32()
   906  	m.TableID = buf.DecodeUint32()
   907  	m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   908  	copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   909  	m.Prefix.Len = buf.DecodeUint8()
   910  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   911  	m.TrafficType = sr_types.SrSteer(buf.DecodeUint8())
   912  	return nil
   913  }
   914  
   915  // SrSteeringAddDelReply defines message 'sr_steering_add_del_reply'.
   916  type SrSteeringAddDelReply struct {
   917  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   918  }
   919  
   920  func (m *SrSteeringAddDelReply) Reset()               { *m = SrSteeringAddDelReply{} }
   921  func (*SrSteeringAddDelReply) GetMessageName() string { return "sr_steering_add_del_reply" }
   922  func (*SrSteeringAddDelReply) GetCrcString() string   { return "e8d4e804" }
   923  func (*SrSteeringAddDelReply) GetMessageType() api.MessageType {
   924  	return api.ReplyMessage
   925  }
   926  
   927  func (m *SrSteeringAddDelReply) Size() (size int) {
   928  	if m == nil {
   929  		return 0
   930  	}
   931  	size += 4 // m.Retval
   932  	return size
   933  }
   934  func (m *SrSteeringAddDelReply) Marshal(b []byte) ([]byte, error) {
   935  	if b == nil {
   936  		b = make([]byte, m.Size())
   937  	}
   938  	buf := codec.NewBuffer(b)
   939  	buf.EncodeInt32(m.Retval)
   940  	return buf.Bytes(), nil
   941  }
   942  func (m *SrSteeringAddDelReply) Unmarshal(b []byte) error {
   943  	buf := codec.NewBuffer(b)
   944  	m.Retval = buf.DecodeInt32()
   945  	return nil
   946  }
   947  
   948  // SrSteeringPolDetails defines message 'sr_steering_pol_details'.
   949  type SrSteeringPolDetails struct {
   950  	TrafficType sr_types.SrSteer               `binapi:"sr_steer,name=traffic_type" json:"traffic_type,omitempty"`
   951  	FibTable    uint32                         `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   952  	Prefix      ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
   953  	SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   954  	Bsid        ip_types.IP6Address            `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
   955  }
   956  
   957  func (m *SrSteeringPolDetails) Reset()               { *m = SrSteeringPolDetails{} }
   958  func (*SrSteeringPolDetails) GetMessageName() string { return "sr_steering_pol_details" }
   959  func (*SrSteeringPolDetails) GetCrcString() string   { return "1c1ee786" }
   960  func (*SrSteeringPolDetails) GetMessageType() api.MessageType {
   961  	return api.ReplyMessage
   962  }
   963  
   964  func (m *SrSteeringPolDetails) Size() (size int) {
   965  	if m == nil {
   966  		return 0
   967  	}
   968  	size += 1      // m.TrafficType
   969  	size += 4      // m.FibTable
   970  	size += 1      // m.Prefix.Address.Af
   971  	size += 1 * 16 // m.Prefix.Address.Un
   972  	size += 1      // m.Prefix.Len
   973  	size += 4      // m.SwIfIndex
   974  	size += 1 * 16 // m.Bsid
   975  	return size
   976  }
   977  func (m *SrSteeringPolDetails) Marshal(b []byte) ([]byte, error) {
   978  	if b == nil {
   979  		b = make([]byte, m.Size())
   980  	}
   981  	buf := codec.NewBuffer(b)
   982  	buf.EncodeUint8(uint8(m.TrafficType))
   983  	buf.EncodeUint32(m.FibTable)
   984  	buf.EncodeUint8(uint8(m.Prefix.Address.Af))
   985  	buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
   986  	buf.EncodeUint8(m.Prefix.Len)
   987  	buf.EncodeUint32(uint32(m.SwIfIndex))
   988  	buf.EncodeBytes(m.Bsid[:], 16)
   989  	return buf.Bytes(), nil
   990  }
   991  func (m *SrSteeringPolDetails) Unmarshal(b []byte) error {
   992  	buf := codec.NewBuffer(b)
   993  	m.TrafficType = sr_types.SrSteer(buf.DecodeUint8())
   994  	m.FibTable = buf.DecodeUint32()
   995  	m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   996  	copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   997  	m.Prefix.Len = buf.DecodeUint8()
   998  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   999  	copy(m.Bsid[:], buf.DecodeBytes(16))
  1000  	return nil
  1001  }
  1002  
  1003  // SrSteeringPolDump defines message 'sr_steering_pol_dump'.
  1004  type SrSteeringPolDump struct{}
  1005  
  1006  func (m *SrSteeringPolDump) Reset()               { *m = SrSteeringPolDump{} }
  1007  func (*SrSteeringPolDump) GetMessageName() string { return "sr_steering_pol_dump" }
  1008  func (*SrSteeringPolDump) GetCrcString() string   { return "51077d14" }
  1009  func (*SrSteeringPolDump) GetMessageType() api.MessageType {
  1010  	return api.RequestMessage
  1011  }
  1012  
  1013  func (m *SrSteeringPolDump) Size() (size int) {
  1014  	if m == nil {
  1015  		return 0
  1016  	}
  1017  	return size
  1018  }
  1019  func (m *SrSteeringPolDump) Marshal(b []byte) ([]byte, error) {
  1020  	if b == nil {
  1021  		b = make([]byte, m.Size())
  1022  	}
  1023  	buf := codec.NewBuffer(b)
  1024  	return buf.Bytes(), nil
  1025  }
  1026  func (m *SrSteeringPolDump) Unmarshal(b []byte) error {
  1027  	return nil
  1028  }
  1029  
  1030  func init() { file_sr_binapi_init() }
  1031  func file_sr_binapi_init() {
  1032  	api.RegisterMessage((*SrLocalsidAddDel)(nil), "sr_localsid_add_del_26fa3309")
  1033  	api.RegisterMessage((*SrLocalsidAddDelReply)(nil), "sr_localsid_add_del_reply_e8d4e804")
  1034  	api.RegisterMessage((*SrLocalsidsDetails)(nil), "sr_localsids_details_6a6c0265")
  1035  	api.RegisterMessage((*SrLocalsidsDump)(nil), "sr_localsids_dump_51077d14")
  1036  	api.RegisterMessage((*SrPoliciesDetails)(nil), "sr_policies_details_07ec2d93")
  1037  	api.RegisterMessage((*SrPoliciesDump)(nil), "sr_policies_dump_51077d14")
  1038  	api.RegisterMessage((*SrPoliciesWithSlIndexDetails)(nil), "sr_policies_with_sl_index_details_ca2e9bc8")
  1039  	api.RegisterMessage((*SrPoliciesWithSlIndexDump)(nil), "sr_policies_with_sl_index_dump_51077d14")
  1040  	api.RegisterMessage((*SrPolicyAdd)(nil), "sr_policy_add_ec79ee6a")
  1041  	api.RegisterMessage((*SrPolicyAddReply)(nil), "sr_policy_add_reply_e8d4e804")
  1042  	api.RegisterMessage((*SrPolicyDel)(nil), "sr_policy_del_cb4d48d5")
  1043  	api.RegisterMessage((*SrPolicyDelReply)(nil), "sr_policy_del_reply_e8d4e804")
  1044  	api.RegisterMessage((*SrPolicyMod)(nil), "sr_policy_mod_e531a102")
  1045  	api.RegisterMessage((*SrPolicyModReply)(nil), "sr_policy_mod_reply_e8d4e804")
  1046  	api.RegisterMessage((*SrSetEncapHopLimit)(nil), "sr_set_encap_hop_limit_aa75d7d0")
  1047  	api.RegisterMessage((*SrSetEncapHopLimitReply)(nil), "sr_set_encap_hop_limit_reply_e8d4e804")
  1048  	api.RegisterMessage((*SrSetEncapSource)(nil), "sr_set_encap_source_d3bad5e1")
  1049  	api.RegisterMessage((*SrSetEncapSourceReply)(nil), "sr_set_encap_source_reply_e8d4e804")
  1050  	api.RegisterMessage((*SrSteeringAddDel)(nil), "sr_steering_add_del_3711dace")
  1051  	api.RegisterMessage((*SrSteeringAddDelReply)(nil), "sr_steering_add_del_reply_e8d4e804")
  1052  	api.RegisterMessage((*SrSteeringPolDetails)(nil), "sr_steering_pol_details_1c1ee786")
  1053  	api.RegisterMessage((*SrSteeringPolDump)(nil), "sr_steering_pol_dump_51077d14")
  1054  }
  1055  
  1056  // Messages returns list of all messages in this module.
  1057  func AllMessages() []api.Message {
  1058  	return []api.Message{
  1059  		(*SrLocalsidAddDel)(nil),
  1060  		(*SrLocalsidAddDelReply)(nil),
  1061  		(*SrLocalsidsDetails)(nil),
  1062  		(*SrLocalsidsDump)(nil),
  1063  		(*SrPoliciesDetails)(nil),
  1064  		(*SrPoliciesDump)(nil),
  1065  		(*SrPoliciesWithSlIndexDetails)(nil),
  1066  		(*SrPoliciesWithSlIndexDump)(nil),
  1067  		(*SrPolicyAdd)(nil),
  1068  		(*SrPolicyAddReply)(nil),
  1069  		(*SrPolicyDel)(nil),
  1070  		(*SrPolicyDelReply)(nil),
  1071  		(*SrPolicyMod)(nil),
  1072  		(*SrPolicyModReply)(nil),
  1073  		(*SrSetEncapHopLimit)(nil),
  1074  		(*SrSetEncapHopLimitReply)(nil),
  1075  		(*SrSetEncapSource)(nil),
  1076  		(*SrSetEncapSourceReply)(nil),
  1077  		(*SrSteeringAddDel)(nil),
  1078  		(*SrSteeringAddDelReply)(nil),
  1079  		(*SrSteeringPolDetails)(nil),
  1080  		(*SrSteeringPolDump)(nil),
  1081  	}
  1082  }