go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/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/vpp2106/interface_types"
    14  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ip_types"
    15  	sr_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/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 = 0xb17a64be
    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 "5a36c324" }
    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 "2e9221b9" }
   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 "db6ff2a1" }
   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  // InProgress: the message form may change in the future versions
   339  type SrPoliciesWithSlIndexDetails struct {
   340  	Bsid        ip_types.IP6Address      `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
   341  	IsSpray     bool                     `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
   342  	IsEncap     bool                     `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
   343  	FibTable    uint32                   `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   344  	NumSidLists uint8                    `binapi:"u8,name=num_sid_lists" json:"-"`
   345  	SidLists    []Srv6SidListWithSlIndex `binapi:"srv6_sid_list_with_sl_index[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"`
   346  }
   347  
   348  func (m *SrPoliciesWithSlIndexDetails) Reset() { *m = SrPoliciesWithSlIndexDetails{} }
   349  func (*SrPoliciesWithSlIndexDetails) GetMessageName() string {
   350  	return "sr_policies_with_sl_index_details"
   351  }
   352  func (*SrPoliciesWithSlIndexDetails) GetCrcString() string { return "ca2e9bc8" }
   353  func (*SrPoliciesWithSlIndexDetails) GetMessageType() api.MessageType {
   354  	return api.ReplyMessage
   355  }
   356  
   357  func (m *SrPoliciesWithSlIndexDetails) Size() (size int) {
   358  	if m == nil {
   359  		return 0
   360  	}
   361  	size += 1 * 16 // m.Bsid
   362  	size += 1      // m.IsSpray
   363  	size += 1      // m.IsEncap
   364  	size += 4      // m.FibTable
   365  	size += 1      // m.NumSidLists
   366  	for j1 := 0; j1 < len(m.SidLists); j1++ {
   367  		var s1 Srv6SidListWithSlIndex
   368  		_ = s1
   369  		if j1 < len(m.SidLists) {
   370  			s1 = m.SidLists[j1]
   371  		}
   372  		size += 1 // s1.NumSids
   373  		size += 4 // s1.Weight
   374  		size += 4 // s1.SlIndex
   375  		for j2 := 0; j2 < 16; j2++ {
   376  			size += 1 * 16 // s1.Sids[j2]
   377  		}
   378  	}
   379  	return size
   380  }
   381  func (m *SrPoliciesWithSlIndexDetails) Marshal(b []byte) ([]byte, error) {
   382  	if b == nil {
   383  		b = make([]byte, m.Size())
   384  	}
   385  	buf := codec.NewBuffer(b)
   386  	buf.EncodeBytes(m.Bsid[:], 16)
   387  	buf.EncodeBool(m.IsSpray)
   388  	buf.EncodeBool(m.IsEncap)
   389  	buf.EncodeUint32(m.FibTable)
   390  	buf.EncodeUint8(uint8(len(m.SidLists)))
   391  	for j0 := 0; j0 < len(m.SidLists); j0++ {
   392  		var v0 Srv6SidListWithSlIndex // SidLists
   393  		if j0 < len(m.SidLists) {
   394  			v0 = m.SidLists[j0]
   395  		}
   396  		buf.EncodeUint8(v0.NumSids)
   397  		buf.EncodeUint32(v0.Weight)
   398  		buf.EncodeUint32(v0.SlIndex)
   399  		for j1 := 0; j1 < 16; j1++ {
   400  			buf.EncodeBytes(v0.Sids[j1][:], 16)
   401  		}
   402  	}
   403  	return buf.Bytes(), nil
   404  }
   405  func (m *SrPoliciesWithSlIndexDetails) Unmarshal(b []byte) error {
   406  	buf := codec.NewBuffer(b)
   407  	copy(m.Bsid[:], buf.DecodeBytes(16))
   408  	m.IsSpray = buf.DecodeBool()
   409  	m.IsEncap = buf.DecodeBool()
   410  	m.FibTable = buf.DecodeUint32()
   411  	m.NumSidLists = buf.DecodeUint8()
   412  	m.SidLists = make([]Srv6SidListWithSlIndex, m.NumSidLists)
   413  	for j0 := 0; j0 < len(m.SidLists); j0++ {
   414  		m.SidLists[j0].NumSids = buf.DecodeUint8()
   415  		m.SidLists[j0].Weight = buf.DecodeUint32()
   416  		m.SidLists[j0].SlIndex = buf.DecodeUint32()
   417  		for j1 := 0; j1 < 16; j1++ {
   418  			copy(m.SidLists[j0].Sids[j1][:], buf.DecodeBytes(16))
   419  		}
   420  	}
   421  	return nil
   422  }
   423  
   424  // SrPoliciesWithSlIndexDump defines message 'sr_policies_with_sl_index_dump'.
   425  // InProgress: the message form may change in the future versions
   426  type SrPoliciesWithSlIndexDump struct{}
   427  
   428  func (m *SrPoliciesWithSlIndexDump) Reset()               { *m = SrPoliciesWithSlIndexDump{} }
   429  func (*SrPoliciesWithSlIndexDump) GetMessageName() string { return "sr_policies_with_sl_index_dump" }
   430  func (*SrPoliciesWithSlIndexDump) GetCrcString() string   { return "51077d14" }
   431  func (*SrPoliciesWithSlIndexDump) GetMessageType() api.MessageType {
   432  	return api.RequestMessage
   433  }
   434  
   435  func (m *SrPoliciesWithSlIndexDump) Size() (size int) {
   436  	if m == nil {
   437  		return 0
   438  	}
   439  	return size
   440  }
   441  func (m *SrPoliciesWithSlIndexDump) Marshal(b []byte) ([]byte, error) {
   442  	if b == nil {
   443  		b = make([]byte, m.Size())
   444  	}
   445  	buf := codec.NewBuffer(b)
   446  	return buf.Bytes(), nil
   447  }
   448  func (m *SrPoliciesWithSlIndexDump) Unmarshal(b []byte) error {
   449  	return nil
   450  }
   451  
   452  // SrPolicyAdd defines message 'sr_policy_add'.
   453  type SrPolicyAdd struct {
   454  	BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   455  	Weight   uint32              `binapi:"u32,name=weight" json:"weight,omitempty"`
   456  	IsEncap  bool                `binapi:"bool,name=is_encap" json:"is_encap,omitempty"`
   457  	IsSpray  bool                `binapi:"bool,name=is_spray" json:"is_spray,omitempty"`
   458  	FibTable uint32              `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   459  	Sids     Srv6SidList         `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
   460  }
   461  
   462  func (m *SrPolicyAdd) Reset()               { *m = SrPolicyAdd{} }
   463  func (*SrPolicyAdd) GetMessageName() string { return "sr_policy_add" }
   464  func (*SrPolicyAdd) GetCrcString() string   { return "44ac92e8" }
   465  func (*SrPolicyAdd) GetMessageType() api.MessageType {
   466  	return api.RequestMessage
   467  }
   468  
   469  func (m *SrPolicyAdd) Size() (size int) {
   470  	if m == nil {
   471  		return 0
   472  	}
   473  	size += 1 * 16 // m.BsidAddr
   474  	size += 4      // m.Weight
   475  	size += 1      // m.IsEncap
   476  	size += 1      // m.IsSpray
   477  	size += 4      // m.FibTable
   478  	size += 1      // m.Sids.NumSids
   479  	size += 4      // m.Sids.Weight
   480  	for j2 := 0; j2 < 16; j2++ {
   481  		size += 1 * 16 // m.Sids.Sids[j2]
   482  	}
   483  	return size
   484  }
   485  func (m *SrPolicyAdd) Marshal(b []byte) ([]byte, error) {
   486  	if b == nil {
   487  		b = make([]byte, m.Size())
   488  	}
   489  	buf := codec.NewBuffer(b)
   490  	buf.EncodeBytes(m.BsidAddr[:], 16)
   491  	buf.EncodeUint32(m.Weight)
   492  	buf.EncodeBool(m.IsEncap)
   493  	buf.EncodeBool(m.IsSpray)
   494  	buf.EncodeUint32(m.FibTable)
   495  	buf.EncodeUint8(m.Sids.NumSids)
   496  	buf.EncodeUint32(m.Sids.Weight)
   497  	for j1 := 0; j1 < 16; j1++ {
   498  		buf.EncodeBytes(m.Sids.Sids[j1][:], 16)
   499  	}
   500  	return buf.Bytes(), nil
   501  }
   502  func (m *SrPolicyAdd) Unmarshal(b []byte) error {
   503  	buf := codec.NewBuffer(b)
   504  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   505  	m.Weight = buf.DecodeUint32()
   506  	m.IsEncap = buf.DecodeBool()
   507  	m.IsSpray = buf.DecodeBool()
   508  	m.FibTable = buf.DecodeUint32()
   509  	m.Sids.NumSids = buf.DecodeUint8()
   510  	m.Sids.Weight = buf.DecodeUint32()
   511  	for j1 := 0; j1 < 16; j1++ {
   512  		copy(m.Sids.Sids[j1][:], buf.DecodeBytes(16))
   513  	}
   514  	return nil
   515  }
   516  
   517  // SrPolicyAddReply defines message 'sr_policy_add_reply'.
   518  type SrPolicyAddReply struct {
   519  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   520  }
   521  
   522  func (m *SrPolicyAddReply) Reset()               { *m = SrPolicyAddReply{} }
   523  func (*SrPolicyAddReply) GetMessageName() string { return "sr_policy_add_reply" }
   524  func (*SrPolicyAddReply) GetCrcString() string   { return "e8d4e804" }
   525  func (*SrPolicyAddReply) GetMessageType() api.MessageType {
   526  	return api.ReplyMessage
   527  }
   528  
   529  func (m *SrPolicyAddReply) Size() (size int) {
   530  	if m == nil {
   531  		return 0
   532  	}
   533  	size += 4 // m.Retval
   534  	return size
   535  }
   536  func (m *SrPolicyAddReply) Marshal(b []byte) ([]byte, error) {
   537  	if b == nil {
   538  		b = make([]byte, m.Size())
   539  	}
   540  	buf := codec.NewBuffer(b)
   541  	buf.EncodeInt32(m.Retval)
   542  	return buf.Bytes(), nil
   543  }
   544  func (m *SrPolicyAddReply) Unmarshal(b []byte) error {
   545  	buf := codec.NewBuffer(b)
   546  	m.Retval = buf.DecodeInt32()
   547  	return nil
   548  }
   549  
   550  // SrPolicyDel defines message 'sr_policy_del'.
   551  type SrPolicyDel struct {
   552  	BsidAddr      ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   553  	SrPolicyIndex uint32              `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
   554  }
   555  
   556  func (m *SrPolicyDel) Reset()               { *m = SrPolicyDel{} }
   557  func (*SrPolicyDel) GetMessageName() string { return "sr_policy_del" }
   558  func (*SrPolicyDel) GetCrcString() string   { return "cb4d48d5" }
   559  func (*SrPolicyDel) GetMessageType() api.MessageType {
   560  	return api.RequestMessage
   561  }
   562  
   563  func (m *SrPolicyDel) Size() (size int) {
   564  	if m == nil {
   565  		return 0
   566  	}
   567  	size += 1 * 16 // m.BsidAddr
   568  	size += 4      // m.SrPolicyIndex
   569  	return size
   570  }
   571  func (m *SrPolicyDel) Marshal(b []byte) ([]byte, error) {
   572  	if b == nil {
   573  		b = make([]byte, m.Size())
   574  	}
   575  	buf := codec.NewBuffer(b)
   576  	buf.EncodeBytes(m.BsidAddr[:], 16)
   577  	buf.EncodeUint32(m.SrPolicyIndex)
   578  	return buf.Bytes(), nil
   579  }
   580  func (m *SrPolicyDel) Unmarshal(b []byte) error {
   581  	buf := codec.NewBuffer(b)
   582  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   583  	m.SrPolicyIndex = buf.DecodeUint32()
   584  	return nil
   585  }
   586  
   587  // SrPolicyDelReply defines message 'sr_policy_del_reply'.
   588  type SrPolicyDelReply struct {
   589  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   590  }
   591  
   592  func (m *SrPolicyDelReply) Reset()               { *m = SrPolicyDelReply{} }
   593  func (*SrPolicyDelReply) GetMessageName() string { return "sr_policy_del_reply" }
   594  func (*SrPolicyDelReply) GetCrcString() string   { return "e8d4e804" }
   595  func (*SrPolicyDelReply) GetMessageType() api.MessageType {
   596  	return api.ReplyMessage
   597  }
   598  
   599  func (m *SrPolicyDelReply) Size() (size int) {
   600  	if m == nil {
   601  		return 0
   602  	}
   603  	size += 4 // m.Retval
   604  	return size
   605  }
   606  func (m *SrPolicyDelReply) Marshal(b []byte) ([]byte, error) {
   607  	if b == nil {
   608  		b = make([]byte, m.Size())
   609  	}
   610  	buf := codec.NewBuffer(b)
   611  	buf.EncodeInt32(m.Retval)
   612  	return buf.Bytes(), nil
   613  }
   614  func (m *SrPolicyDelReply) Unmarshal(b []byte) error {
   615  	buf := codec.NewBuffer(b)
   616  	m.Retval = buf.DecodeInt32()
   617  	return nil
   618  }
   619  
   620  // SrPolicyMod defines message 'sr_policy_mod'.
   621  type SrPolicyMod struct {
   622  	BsidAddr      ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   623  	SrPolicyIndex uint32              `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
   624  	FibTable      uint32              `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   625  	Operation     sr_types.SrPolicyOp `binapi:"sr_policy_op,name=operation" json:"operation,omitempty"`
   626  	SlIndex       uint32              `binapi:"u32,name=sl_index" json:"sl_index,omitempty"`
   627  	Weight        uint32              `binapi:"u32,name=weight" json:"weight,omitempty"`
   628  	Sids          Srv6SidList         `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
   629  }
   630  
   631  func (m *SrPolicyMod) Reset()               { *m = SrPolicyMod{} }
   632  func (*SrPolicyMod) GetMessageName() string { return "sr_policy_mod" }
   633  func (*SrPolicyMod) GetCrcString() string   { return "b97bb56e" }
   634  func (*SrPolicyMod) GetMessageType() api.MessageType {
   635  	return api.RequestMessage
   636  }
   637  
   638  func (m *SrPolicyMod) Size() (size int) {
   639  	if m == nil {
   640  		return 0
   641  	}
   642  	size += 1 * 16 // m.BsidAddr
   643  	size += 4      // m.SrPolicyIndex
   644  	size += 4      // m.FibTable
   645  	size += 1      // m.Operation
   646  	size += 4      // m.SlIndex
   647  	size += 4      // m.Weight
   648  	size += 1      // m.Sids.NumSids
   649  	size += 4      // m.Sids.Weight
   650  	for j2 := 0; j2 < 16; j2++ {
   651  		size += 1 * 16 // m.Sids.Sids[j2]
   652  	}
   653  	return size
   654  }
   655  func (m *SrPolicyMod) Marshal(b []byte) ([]byte, error) {
   656  	if b == nil {
   657  		b = make([]byte, m.Size())
   658  	}
   659  	buf := codec.NewBuffer(b)
   660  	buf.EncodeBytes(m.BsidAddr[:], 16)
   661  	buf.EncodeUint32(m.SrPolicyIndex)
   662  	buf.EncodeUint32(m.FibTable)
   663  	buf.EncodeUint8(uint8(m.Operation))
   664  	buf.EncodeUint32(m.SlIndex)
   665  	buf.EncodeUint32(m.Weight)
   666  	buf.EncodeUint8(m.Sids.NumSids)
   667  	buf.EncodeUint32(m.Sids.Weight)
   668  	for j1 := 0; j1 < 16; j1++ {
   669  		buf.EncodeBytes(m.Sids.Sids[j1][:], 16)
   670  	}
   671  	return buf.Bytes(), nil
   672  }
   673  func (m *SrPolicyMod) Unmarshal(b []byte) error {
   674  	buf := codec.NewBuffer(b)
   675  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   676  	m.SrPolicyIndex = buf.DecodeUint32()
   677  	m.FibTable = buf.DecodeUint32()
   678  	m.Operation = sr_types.SrPolicyOp(buf.DecodeUint8())
   679  	m.SlIndex = buf.DecodeUint32()
   680  	m.Weight = buf.DecodeUint32()
   681  	m.Sids.NumSids = buf.DecodeUint8()
   682  	m.Sids.Weight = buf.DecodeUint32()
   683  	for j1 := 0; j1 < 16; j1++ {
   684  		copy(m.Sids.Sids[j1][:], buf.DecodeBytes(16))
   685  	}
   686  	return nil
   687  }
   688  
   689  // SrPolicyModReply defines message 'sr_policy_mod_reply'.
   690  type SrPolicyModReply struct {
   691  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   692  }
   693  
   694  func (m *SrPolicyModReply) Reset()               { *m = SrPolicyModReply{} }
   695  func (*SrPolicyModReply) GetMessageName() string { return "sr_policy_mod_reply" }
   696  func (*SrPolicyModReply) GetCrcString() string   { return "e8d4e804" }
   697  func (*SrPolicyModReply) GetMessageType() api.MessageType {
   698  	return api.ReplyMessage
   699  }
   700  
   701  func (m *SrPolicyModReply) Size() (size int) {
   702  	if m == nil {
   703  		return 0
   704  	}
   705  	size += 4 // m.Retval
   706  	return size
   707  }
   708  func (m *SrPolicyModReply) Marshal(b []byte) ([]byte, error) {
   709  	if b == nil {
   710  		b = make([]byte, m.Size())
   711  	}
   712  	buf := codec.NewBuffer(b)
   713  	buf.EncodeInt32(m.Retval)
   714  	return buf.Bytes(), nil
   715  }
   716  func (m *SrPolicyModReply) Unmarshal(b []byte) error {
   717  	buf := codec.NewBuffer(b)
   718  	m.Retval = buf.DecodeInt32()
   719  	return nil
   720  }
   721  
   722  // SrSetEncapHopLimit defines message 'sr_set_encap_hop_limit'.
   723  type SrSetEncapHopLimit struct {
   724  	HopLimit uint8 `binapi:"u8,name=hop_limit" json:"hop_limit,omitempty"`
   725  }
   726  
   727  func (m *SrSetEncapHopLimit) Reset()               { *m = SrSetEncapHopLimit{} }
   728  func (*SrSetEncapHopLimit) GetMessageName() string { return "sr_set_encap_hop_limit" }
   729  func (*SrSetEncapHopLimit) GetCrcString() string   { return "aa75d7d0" }
   730  func (*SrSetEncapHopLimit) GetMessageType() api.MessageType {
   731  	return api.RequestMessage
   732  }
   733  
   734  func (m *SrSetEncapHopLimit) Size() (size int) {
   735  	if m == nil {
   736  		return 0
   737  	}
   738  	size += 1 // m.HopLimit
   739  	return size
   740  }
   741  func (m *SrSetEncapHopLimit) Marshal(b []byte) ([]byte, error) {
   742  	if b == nil {
   743  		b = make([]byte, m.Size())
   744  	}
   745  	buf := codec.NewBuffer(b)
   746  	buf.EncodeUint8(m.HopLimit)
   747  	return buf.Bytes(), nil
   748  }
   749  func (m *SrSetEncapHopLimit) Unmarshal(b []byte) error {
   750  	buf := codec.NewBuffer(b)
   751  	m.HopLimit = buf.DecodeUint8()
   752  	return nil
   753  }
   754  
   755  // SrSetEncapHopLimitReply defines message 'sr_set_encap_hop_limit_reply'.
   756  type SrSetEncapHopLimitReply struct {
   757  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   758  }
   759  
   760  func (m *SrSetEncapHopLimitReply) Reset()               { *m = SrSetEncapHopLimitReply{} }
   761  func (*SrSetEncapHopLimitReply) GetMessageName() string { return "sr_set_encap_hop_limit_reply" }
   762  func (*SrSetEncapHopLimitReply) GetCrcString() string   { return "e8d4e804" }
   763  func (*SrSetEncapHopLimitReply) GetMessageType() api.MessageType {
   764  	return api.ReplyMessage
   765  }
   766  
   767  func (m *SrSetEncapHopLimitReply) Size() (size int) {
   768  	if m == nil {
   769  		return 0
   770  	}
   771  	size += 4 // m.Retval
   772  	return size
   773  }
   774  func (m *SrSetEncapHopLimitReply) Marshal(b []byte) ([]byte, error) {
   775  	if b == nil {
   776  		b = make([]byte, m.Size())
   777  	}
   778  	buf := codec.NewBuffer(b)
   779  	buf.EncodeInt32(m.Retval)
   780  	return buf.Bytes(), nil
   781  }
   782  func (m *SrSetEncapHopLimitReply) Unmarshal(b []byte) error {
   783  	buf := codec.NewBuffer(b)
   784  	m.Retval = buf.DecodeInt32()
   785  	return nil
   786  }
   787  
   788  // SrSetEncapSource defines message 'sr_set_encap_source'.
   789  type SrSetEncapSource struct {
   790  	EncapsSource ip_types.IP6Address `binapi:"ip6_address,name=encaps_source" json:"encaps_source,omitempty"`
   791  }
   792  
   793  func (m *SrSetEncapSource) Reset()               { *m = SrSetEncapSource{} }
   794  func (*SrSetEncapSource) GetMessageName() string { return "sr_set_encap_source" }
   795  func (*SrSetEncapSource) GetCrcString() string   { return "d3bad5e1" }
   796  func (*SrSetEncapSource) GetMessageType() api.MessageType {
   797  	return api.RequestMessage
   798  }
   799  
   800  func (m *SrSetEncapSource) Size() (size int) {
   801  	if m == nil {
   802  		return 0
   803  	}
   804  	size += 1 * 16 // m.EncapsSource
   805  	return size
   806  }
   807  func (m *SrSetEncapSource) Marshal(b []byte) ([]byte, error) {
   808  	if b == nil {
   809  		b = make([]byte, m.Size())
   810  	}
   811  	buf := codec.NewBuffer(b)
   812  	buf.EncodeBytes(m.EncapsSource[:], 16)
   813  	return buf.Bytes(), nil
   814  }
   815  func (m *SrSetEncapSource) Unmarshal(b []byte) error {
   816  	buf := codec.NewBuffer(b)
   817  	copy(m.EncapsSource[:], buf.DecodeBytes(16))
   818  	return nil
   819  }
   820  
   821  // SrSetEncapSourceReply defines message 'sr_set_encap_source_reply'.
   822  type SrSetEncapSourceReply struct {
   823  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   824  }
   825  
   826  func (m *SrSetEncapSourceReply) Reset()               { *m = SrSetEncapSourceReply{} }
   827  func (*SrSetEncapSourceReply) GetMessageName() string { return "sr_set_encap_source_reply" }
   828  func (*SrSetEncapSourceReply) GetCrcString() string   { return "e8d4e804" }
   829  func (*SrSetEncapSourceReply) GetMessageType() api.MessageType {
   830  	return api.ReplyMessage
   831  }
   832  
   833  func (m *SrSetEncapSourceReply) Size() (size int) {
   834  	if m == nil {
   835  		return 0
   836  	}
   837  	size += 4 // m.Retval
   838  	return size
   839  }
   840  func (m *SrSetEncapSourceReply) Marshal(b []byte) ([]byte, error) {
   841  	if b == nil {
   842  		b = make([]byte, m.Size())
   843  	}
   844  	buf := codec.NewBuffer(b)
   845  	buf.EncodeInt32(m.Retval)
   846  	return buf.Bytes(), nil
   847  }
   848  func (m *SrSetEncapSourceReply) Unmarshal(b []byte) error {
   849  	buf := codec.NewBuffer(b)
   850  	m.Retval = buf.DecodeInt32()
   851  	return nil
   852  }
   853  
   854  // SrSteeringAddDel defines message 'sr_steering_add_del'.
   855  type SrSteeringAddDel struct {
   856  	IsDel         bool                           `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"`
   857  	BsidAddr      ip_types.IP6Address            `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"`
   858  	SrPolicyIndex uint32                         `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
   859  	TableID       uint32                         `binapi:"u32,name=table_id" json:"table_id,omitempty"`
   860  	Prefix        ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
   861  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   862  	TrafficType   sr_types.SrSteer               `binapi:"sr_steer,name=traffic_type" json:"traffic_type,omitempty"`
   863  }
   864  
   865  func (m *SrSteeringAddDel) Reset()               { *m = SrSteeringAddDel{} }
   866  func (*SrSteeringAddDel) GetMessageName() string { return "sr_steering_add_del" }
   867  func (*SrSteeringAddDel) GetCrcString() string   { return "e46b0a0f" }
   868  func (*SrSteeringAddDel) GetMessageType() api.MessageType {
   869  	return api.RequestMessage
   870  }
   871  
   872  func (m *SrSteeringAddDel) Size() (size int) {
   873  	if m == nil {
   874  		return 0
   875  	}
   876  	size += 1      // m.IsDel
   877  	size += 1 * 16 // m.BsidAddr
   878  	size += 4      // m.SrPolicyIndex
   879  	size += 4      // m.TableID
   880  	size += 1      // m.Prefix.Address.Af
   881  	size += 1 * 16 // m.Prefix.Address.Un
   882  	size += 1      // m.Prefix.Len
   883  	size += 4      // m.SwIfIndex
   884  	size += 1      // m.TrafficType
   885  	return size
   886  }
   887  func (m *SrSteeringAddDel) Marshal(b []byte) ([]byte, error) {
   888  	if b == nil {
   889  		b = make([]byte, m.Size())
   890  	}
   891  	buf := codec.NewBuffer(b)
   892  	buf.EncodeBool(m.IsDel)
   893  	buf.EncodeBytes(m.BsidAddr[:], 16)
   894  	buf.EncodeUint32(m.SrPolicyIndex)
   895  	buf.EncodeUint32(m.TableID)
   896  	buf.EncodeUint8(uint8(m.Prefix.Address.Af))
   897  	buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
   898  	buf.EncodeUint8(m.Prefix.Len)
   899  	buf.EncodeUint32(uint32(m.SwIfIndex))
   900  	buf.EncodeUint8(uint8(m.TrafficType))
   901  	return buf.Bytes(), nil
   902  }
   903  func (m *SrSteeringAddDel) Unmarshal(b []byte) error {
   904  	buf := codec.NewBuffer(b)
   905  	m.IsDel = buf.DecodeBool()
   906  	copy(m.BsidAddr[:], buf.DecodeBytes(16))
   907  	m.SrPolicyIndex = buf.DecodeUint32()
   908  	m.TableID = buf.DecodeUint32()
   909  	m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   910  	copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   911  	m.Prefix.Len = buf.DecodeUint8()
   912  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   913  	m.TrafficType = sr_types.SrSteer(buf.DecodeUint8())
   914  	return nil
   915  }
   916  
   917  // SrSteeringAddDelReply defines message 'sr_steering_add_del_reply'.
   918  type SrSteeringAddDelReply struct {
   919  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   920  }
   921  
   922  func (m *SrSteeringAddDelReply) Reset()               { *m = SrSteeringAddDelReply{} }
   923  func (*SrSteeringAddDelReply) GetMessageName() string { return "sr_steering_add_del_reply" }
   924  func (*SrSteeringAddDelReply) GetCrcString() string   { return "e8d4e804" }
   925  func (*SrSteeringAddDelReply) GetMessageType() api.MessageType {
   926  	return api.ReplyMessage
   927  }
   928  
   929  func (m *SrSteeringAddDelReply) Size() (size int) {
   930  	if m == nil {
   931  		return 0
   932  	}
   933  	size += 4 // m.Retval
   934  	return size
   935  }
   936  func (m *SrSteeringAddDelReply) Marshal(b []byte) ([]byte, error) {
   937  	if b == nil {
   938  		b = make([]byte, m.Size())
   939  	}
   940  	buf := codec.NewBuffer(b)
   941  	buf.EncodeInt32(m.Retval)
   942  	return buf.Bytes(), nil
   943  }
   944  func (m *SrSteeringAddDelReply) Unmarshal(b []byte) error {
   945  	buf := codec.NewBuffer(b)
   946  	m.Retval = buf.DecodeInt32()
   947  	return nil
   948  }
   949  
   950  // SrSteeringPolDetails defines message 'sr_steering_pol_details'.
   951  type SrSteeringPolDetails struct {
   952  	TrafficType sr_types.SrSteer               `binapi:"sr_steer,name=traffic_type" json:"traffic_type,omitempty"`
   953  	FibTable    uint32                         `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
   954  	Prefix      ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
   955  	SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   956  	Bsid        ip_types.IP6Address            `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"`
   957  }
   958  
   959  func (m *SrSteeringPolDetails) Reset()               { *m = SrSteeringPolDetails{} }
   960  func (*SrSteeringPolDetails) GetMessageName() string { return "sr_steering_pol_details" }
   961  func (*SrSteeringPolDetails) GetCrcString() string   { return "d41258c9" }
   962  func (*SrSteeringPolDetails) GetMessageType() api.MessageType {
   963  	return api.ReplyMessage
   964  }
   965  
   966  func (m *SrSteeringPolDetails) Size() (size int) {
   967  	if m == nil {
   968  		return 0
   969  	}
   970  	size += 1      // m.TrafficType
   971  	size += 4      // m.FibTable
   972  	size += 1      // m.Prefix.Address.Af
   973  	size += 1 * 16 // m.Prefix.Address.Un
   974  	size += 1      // m.Prefix.Len
   975  	size += 4      // m.SwIfIndex
   976  	size += 1 * 16 // m.Bsid
   977  	return size
   978  }
   979  func (m *SrSteeringPolDetails) Marshal(b []byte) ([]byte, error) {
   980  	if b == nil {
   981  		b = make([]byte, m.Size())
   982  	}
   983  	buf := codec.NewBuffer(b)
   984  	buf.EncodeUint8(uint8(m.TrafficType))
   985  	buf.EncodeUint32(m.FibTable)
   986  	buf.EncodeUint8(uint8(m.Prefix.Address.Af))
   987  	buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
   988  	buf.EncodeUint8(m.Prefix.Len)
   989  	buf.EncodeUint32(uint32(m.SwIfIndex))
   990  	buf.EncodeBytes(m.Bsid[:], 16)
   991  	return buf.Bytes(), nil
   992  }
   993  func (m *SrSteeringPolDetails) Unmarshal(b []byte) error {
   994  	buf := codec.NewBuffer(b)
   995  	m.TrafficType = sr_types.SrSteer(buf.DecodeUint8())
   996  	m.FibTable = buf.DecodeUint32()
   997  	m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
   998  	copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   999  	m.Prefix.Len = buf.DecodeUint8()
  1000  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1001  	copy(m.Bsid[:], buf.DecodeBytes(16))
  1002  	return nil
  1003  }
  1004  
  1005  // SrSteeringPolDump defines message 'sr_steering_pol_dump'.
  1006  type SrSteeringPolDump struct{}
  1007  
  1008  func (m *SrSteeringPolDump) Reset()               { *m = SrSteeringPolDump{} }
  1009  func (*SrSteeringPolDump) GetMessageName() string { return "sr_steering_pol_dump" }
  1010  func (*SrSteeringPolDump) GetCrcString() string   { return "51077d14" }
  1011  func (*SrSteeringPolDump) GetMessageType() api.MessageType {
  1012  	return api.RequestMessage
  1013  }
  1014  
  1015  func (m *SrSteeringPolDump) Size() (size int) {
  1016  	if m == nil {
  1017  		return 0
  1018  	}
  1019  	return size
  1020  }
  1021  func (m *SrSteeringPolDump) Marshal(b []byte) ([]byte, error) {
  1022  	if b == nil {
  1023  		b = make([]byte, m.Size())
  1024  	}
  1025  	buf := codec.NewBuffer(b)
  1026  	return buf.Bytes(), nil
  1027  }
  1028  func (m *SrSteeringPolDump) Unmarshal(b []byte) error {
  1029  	return nil
  1030  }
  1031  
  1032  func init() { file_sr_binapi_init() }
  1033  func file_sr_binapi_init() {
  1034  	api.RegisterMessage((*SrLocalsidAddDel)(nil), "sr_localsid_add_del_5a36c324")
  1035  	api.RegisterMessage((*SrLocalsidAddDelReply)(nil), "sr_localsid_add_del_reply_e8d4e804")
  1036  	api.RegisterMessage((*SrLocalsidsDetails)(nil), "sr_localsids_details_2e9221b9")
  1037  	api.RegisterMessage((*SrLocalsidsDump)(nil), "sr_localsids_dump_51077d14")
  1038  	api.RegisterMessage((*SrPoliciesDetails)(nil), "sr_policies_details_db6ff2a1")
  1039  	api.RegisterMessage((*SrPoliciesDump)(nil), "sr_policies_dump_51077d14")
  1040  	api.RegisterMessage((*SrPoliciesWithSlIndexDetails)(nil), "sr_policies_with_sl_index_details_ca2e9bc8")
  1041  	api.RegisterMessage((*SrPoliciesWithSlIndexDump)(nil), "sr_policies_with_sl_index_dump_51077d14")
  1042  	api.RegisterMessage((*SrPolicyAdd)(nil), "sr_policy_add_44ac92e8")
  1043  	api.RegisterMessage((*SrPolicyAddReply)(nil), "sr_policy_add_reply_e8d4e804")
  1044  	api.RegisterMessage((*SrPolicyDel)(nil), "sr_policy_del_cb4d48d5")
  1045  	api.RegisterMessage((*SrPolicyDelReply)(nil), "sr_policy_del_reply_e8d4e804")
  1046  	api.RegisterMessage((*SrPolicyMod)(nil), "sr_policy_mod_b97bb56e")
  1047  	api.RegisterMessage((*SrPolicyModReply)(nil), "sr_policy_mod_reply_e8d4e804")
  1048  	api.RegisterMessage((*SrSetEncapHopLimit)(nil), "sr_set_encap_hop_limit_aa75d7d0")
  1049  	api.RegisterMessage((*SrSetEncapHopLimitReply)(nil), "sr_set_encap_hop_limit_reply_e8d4e804")
  1050  	api.RegisterMessage((*SrSetEncapSource)(nil), "sr_set_encap_source_d3bad5e1")
  1051  	api.RegisterMessage((*SrSetEncapSourceReply)(nil), "sr_set_encap_source_reply_e8d4e804")
  1052  	api.RegisterMessage((*SrSteeringAddDel)(nil), "sr_steering_add_del_e46b0a0f")
  1053  	api.RegisterMessage((*SrSteeringAddDelReply)(nil), "sr_steering_add_del_reply_e8d4e804")
  1054  	api.RegisterMessage((*SrSteeringPolDetails)(nil), "sr_steering_pol_details_d41258c9")
  1055  	api.RegisterMessage((*SrSteeringPolDump)(nil), "sr_steering_pol_dump_51077d14")
  1056  }
  1057  
  1058  // Messages returns list of all messages in this module.
  1059  func AllMessages() []api.Message {
  1060  	return []api.Message{
  1061  		(*SrLocalsidAddDel)(nil),
  1062  		(*SrLocalsidAddDelReply)(nil),
  1063  		(*SrLocalsidsDetails)(nil),
  1064  		(*SrLocalsidsDump)(nil),
  1065  		(*SrPoliciesDetails)(nil),
  1066  		(*SrPoliciesDump)(nil),
  1067  		(*SrPoliciesWithSlIndexDetails)(nil),
  1068  		(*SrPoliciesWithSlIndexDump)(nil),
  1069  		(*SrPolicyAdd)(nil),
  1070  		(*SrPolicyAddReply)(nil),
  1071  		(*SrPolicyDel)(nil),
  1072  		(*SrPolicyDelReply)(nil),
  1073  		(*SrPolicyMod)(nil),
  1074  		(*SrPolicyModReply)(nil),
  1075  		(*SrSetEncapHopLimit)(nil),
  1076  		(*SrSetEncapHopLimitReply)(nil),
  1077  		(*SrSetEncapSource)(nil),
  1078  		(*SrSetEncapSourceReply)(nil),
  1079  		(*SrSteeringAddDel)(nil),
  1080  		(*SrSteeringAddDelReply)(nil),
  1081  		(*SrSteeringPolDetails)(nil),
  1082  		(*SrSteeringPolDump)(nil),
  1083  	}
  1084  }