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

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package abf contains generated bindings for API file abf.api.
     4  //
     5  // Contents:
     6  // -  2 structs
     7  // - 10 messages
     8  package abf
     9  
    10  import (
    11  	api "go.fd.io/govpp/api"
    12  	codec "go.fd.io/govpp/codec"
    13  	fib_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/fib_types"
    14  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types"
    15  	_ "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ip_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    = "abf"
    26  	APIVersion = "1.0.0"
    27  	VersionCrc = 0x9d2916b5
    28  )
    29  
    30  // AbfItfAttach defines type 'abf_itf_attach'.
    31  type AbfItfAttach struct {
    32  	PolicyID  uint32                         `binapi:"u32,name=policy_id" json:"policy_id,omitempty"`
    33  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    34  	Priority  uint32                         `binapi:"u32,name=priority" json:"priority,omitempty"`
    35  	IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
    36  }
    37  
    38  // AbfPolicy defines type 'abf_policy'.
    39  type AbfPolicy struct {
    40  	PolicyID uint32              `binapi:"u32,name=policy_id" json:"policy_id,omitempty"`
    41  	ACLIndex uint32              `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
    42  	NPaths   uint8               `binapi:"u8,name=n_paths" json:"-"`
    43  	Paths    []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
    44  }
    45  
    46  // AbfItfAttachAddDel defines message 'abf_itf_attach_add_del'.
    47  type AbfItfAttachAddDel struct {
    48  	IsAdd  bool         `binapi:"bool,name=is_add" json:"is_add,omitempty"`
    49  	Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
    50  }
    51  
    52  func (m *AbfItfAttachAddDel) Reset()               { *m = AbfItfAttachAddDel{} }
    53  func (*AbfItfAttachAddDel) GetMessageName() string { return "abf_itf_attach_add_del" }
    54  func (*AbfItfAttachAddDel) GetCrcString() string   { return "25c8621b" }
    55  func (*AbfItfAttachAddDel) GetMessageType() api.MessageType {
    56  	return api.RequestMessage
    57  }
    58  
    59  func (m *AbfItfAttachAddDel) Size() (size int) {
    60  	if m == nil {
    61  		return 0
    62  	}
    63  	size += 1 // m.IsAdd
    64  	size += 4 // m.Attach.PolicyID
    65  	size += 4 // m.Attach.SwIfIndex
    66  	size += 4 // m.Attach.Priority
    67  	size += 1 // m.Attach.IsIPv6
    68  	return size
    69  }
    70  func (m *AbfItfAttachAddDel) Marshal(b []byte) ([]byte, error) {
    71  	if b == nil {
    72  		b = make([]byte, m.Size())
    73  	}
    74  	buf := codec.NewBuffer(b)
    75  	buf.EncodeBool(m.IsAdd)
    76  	buf.EncodeUint32(m.Attach.PolicyID)
    77  	buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
    78  	buf.EncodeUint32(m.Attach.Priority)
    79  	buf.EncodeBool(m.Attach.IsIPv6)
    80  	return buf.Bytes(), nil
    81  }
    82  func (m *AbfItfAttachAddDel) Unmarshal(b []byte) error {
    83  	buf := codec.NewBuffer(b)
    84  	m.IsAdd = buf.DecodeBool()
    85  	m.Attach.PolicyID = buf.DecodeUint32()
    86  	m.Attach.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
    87  	m.Attach.Priority = buf.DecodeUint32()
    88  	m.Attach.IsIPv6 = buf.DecodeBool()
    89  	return nil
    90  }
    91  
    92  // AbfItfAttachAddDelReply defines message 'abf_itf_attach_add_del_reply'.
    93  type AbfItfAttachAddDelReply struct {
    94  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    95  }
    96  
    97  func (m *AbfItfAttachAddDelReply) Reset()               { *m = AbfItfAttachAddDelReply{} }
    98  func (*AbfItfAttachAddDelReply) GetMessageName() string { return "abf_itf_attach_add_del_reply" }
    99  func (*AbfItfAttachAddDelReply) GetCrcString() string   { return "e8d4e804" }
   100  func (*AbfItfAttachAddDelReply) GetMessageType() api.MessageType {
   101  	return api.ReplyMessage
   102  }
   103  
   104  func (m *AbfItfAttachAddDelReply) Size() (size int) {
   105  	if m == nil {
   106  		return 0
   107  	}
   108  	size += 4 // m.Retval
   109  	return size
   110  }
   111  func (m *AbfItfAttachAddDelReply) Marshal(b []byte) ([]byte, error) {
   112  	if b == nil {
   113  		b = make([]byte, m.Size())
   114  	}
   115  	buf := codec.NewBuffer(b)
   116  	buf.EncodeInt32(m.Retval)
   117  	return buf.Bytes(), nil
   118  }
   119  func (m *AbfItfAttachAddDelReply) Unmarshal(b []byte) error {
   120  	buf := codec.NewBuffer(b)
   121  	m.Retval = buf.DecodeInt32()
   122  	return nil
   123  }
   124  
   125  // AbfItfAttachDetails defines message 'abf_itf_attach_details'.
   126  type AbfItfAttachDetails struct {
   127  	Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
   128  }
   129  
   130  func (m *AbfItfAttachDetails) Reset()               { *m = AbfItfAttachDetails{} }
   131  func (*AbfItfAttachDetails) GetMessageName() string { return "abf_itf_attach_details" }
   132  func (*AbfItfAttachDetails) GetCrcString() string   { return "7819523e" }
   133  func (*AbfItfAttachDetails) GetMessageType() api.MessageType {
   134  	return api.ReplyMessage
   135  }
   136  
   137  func (m *AbfItfAttachDetails) Size() (size int) {
   138  	if m == nil {
   139  		return 0
   140  	}
   141  	size += 4 // m.Attach.PolicyID
   142  	size += 4 // m.Attach.SwIfIndex
   143  	size += 4 // m.Attach.Priority
   144  	size += 1 // m.Attach.IsIPv6
   145  	return size
   146  }
   147  func (m *AbfItfAttachDetails) Marshal(b []byte) ([]byte, error) {
   148  	if b == nil {
   149  		b = make([]byte, m.Size())
   150  	}
   151  	buf := codec.NewBuffer(b)
   152  	buf.EncodeUint32(m.Attach.PolicyID)
   153  	buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
   154  	buf.EncodeUint32(m.Attach.Priority)
   155  	buf.EncodeBool(m.Attach.IsIPv6)
   156  	return buf.Bytes(), nil
   157  }
   158  func (m *AbfItfAttachDetails) Unmarshal(b []byte) error {
   159  	buf := codec.NewBuffer(b)
   160  	m.Attach.PolicyID = buf.DecodeUint32()
   161  	m.Attach.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   162  	m.Attach.Priority = buf.DecodeUint32()
   163  	m.Attach.IsIPv6 = buf.DecodeBool()
   164  	return nil
   165  }
   166  
   167  // AbfItfAttachDump defines message 'abf_itf_attach_dump'.
   168  type AbfItfAttachDump struct{}
   169  
   170  func (m *AbfItfAttachDump) Reset()               { *m = AbfItfAttachDump{} }
   171  func (*AbfItfAttachDump) GetMessageName() string { return "abf_itf_attach_dump" }
   172  func (*AbfItfAttachDump) GetCrcString() string   { return "51077d14" }
   173  func (*AbfItfAttachDump) GetMessageType() api.MessageType {
   174  	return api.RequestMessage
   175  }
   176  
   177  func (m *AbfItfAttachDump) Size() (size int) {
   178  	if m == nil {
   179  		return 0
   180  	}
   181  	return size
   182  }
   183  func (m *AbfItfAttachDump) Marshal(b []byte) ([]byte, error) {
   184  	if b == nil {
   185  		b = make([]byte, m.Size())
   186  	}
   187  	buf := codec.NewBuffer(b)
   188  	return buf.Bytes(), nil
   189  }
   190  func (m *AbfItfAttachDump) Unmarshal(b []byte) error {
   191  	return nil
   192  }
   193  
   194  // AbfPluginGetVersion defines message 'abf_plugin_get_version'.
   195  type AbfPluginGetVersion struct{}
   196  
   197  func (m *AbfPluginGetVersion) Reset()               { *m = AbfPluginGetVersion{} }
   198  func (*AbfPluginGetVersion) GetMessageName() string { return "abf_plugin_get_version" }
   199  func (*AbfPluginGetVersion) GetCrcString() string   { return "51077d14" }
   200  func (*AbfPluginGetVersion) GetMessageType() api.MessageType {
   201  	return api.RequestMessage
   202  }
   203  
   204  func (m *AbfPluginGetVersion) Size() (size int) {
   205  	if m == nil {
   206  		return 0
   207  	}
   208  	return size
   209  }
   210  func (m *AbfPluginGetVersion) Marshal(b []byte) ([]byte, error) {
   211  	if b == nil {
   212  		b = make([]byte, m.Size())
   213  	}
   214  	buf := codec.NewBuffer(b)
   215  	return buf.Bytes(), nil
   216  }
   217  func (m *AbfPluginGetVersion) Unmarshal(b []byte) error {
   218  	return nil
   219  }
   220  
   221  // AbfPluginGetVersionReply defines message 'abf_plugin_get_version_reply'.
   222  type AbfPluginGetVersionReply struct {
   223  	Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
   224  	Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
   225  }
   226  
   227  func (m *AbfPluginGetVersionReply) Reset()               { *m = AbfPluginGetVersionReply{} }
   228  func (*AbfPluginGetVersionReply) GetMessageName() string { return "abf_plugin_get_version_reply" }
   229  func (*AbfPluginGetVersionReply) GetCrcString() string   { return "9b32cf86" }
   230  func (*AbfPluginGetVersionReply) GetMessageType() api.MessageType {
   231  	return api.ReplyMessage
   232  }
   233  
   234  func (m *AbfPluginGetVersionReply) Size() (size int) {
   235  	if m == nil {
   236  		return 0
   237  	}
   238  	size += 4 // m.Major
   239  	size += 4 // m.Minor
   240  	return size
   241  }
   242  func (m *AbfPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
   243  	if b == nil {
   244  		b = make([]byte, m.Size())
   245  	}
   246  	buf := codec.NewBuffer(b)
   247  	buf.EncodeUint32(m.Major)
   248  	buf.EncodeUint32(m.Minor)
   249  	return buf.Bytes(), nil
   250  }
   251  func (m *AbfPluginGetVersionReply) Unmarshal(b []byte) error {
   252  	buf := codec.NewBuffer(b)
   253  	m.Major = buf.DecodeUint32()
   254  	m.Minor = buf.DecodeUint32()
   255  	return nil
   256  }
   257  
   258  // AbfPolicyAddDel defines message 'abf_policy_add_del'.
   259  type AbfPolicyAddDel struct {
   260  	IsAdd  bool      `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   261  	Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
   262  }
   263  
   264  func (m *AbfPolicyAddDel) Reset()               { *m = AbfPolicyAddDel{} }
   265  func (*AbfPolicyAddDel) GetMessageName() string { return "abf_policy_add_del" }
   266  func (*AbfPolicyAddDel) GetCrcString() string   { return "ee66f93e" }
   267  func (*AbfPolicyAddDel) GetMessageType() api.MessageType {
   268  	return api.RequestMessage
   269  }
   270  
   271  func (m *AbfPolicyAddDel) Size() (size int) {
   272  	if m == nil {
   273  		return 0
   274  	}
   275  	size += 1 // m.IsAdd
   276  	size += 4 // m.Policy.PolicyID
   277  	size += 4 // m.Policy.ACLIndex
   278  	size += 1 // m.Policy.NPaths
   279  	for j2 := 0; j2 < len(m.Policy.Paths); j2++ {
   280  		var s2 fib_types.FibPath
   281  		_ = s2
   282  		if j2 < len(m.Policy.Paths) {
   283  			s2 = m.Policy.Paths[j2]
   284  		}
   285  		size += 4      // s2.SwIfIndex
   286  		size += 4      // s2.TableID
   287  		size += 4      // s2.RpfID
   288  		size += 1      // s2.Weight
   289  		size += 1      // s2.Preference
   290  		size += 4      // s2.Type
   291  		size += 4      // s2.Flags
   292  		size += 4      // s2.Proto
   293  		size += 1 * 16 // s2.Nh.Address
   294  		size += 4      // s2.Nh.ViaLabel
   295  		size += 4      // s2.Nh.ObjID
   296  		size += 4      // s2.Nh.ClassifyTableIndex
   297  		size += 1      // s2.NLabels
   298  		for j3 := 0; j3 < 16; j3++ {
   299  			size += 1 // s2.LabelStack[j3].IsUniform
   300  			size += 4 // s2.LabelStack[j3].Label
   301  			size += 1 // s2.LabelStack[j3].TTL
   302  			size += 1 // s2.LabelStack[j3].Exp
   303  		}
   304  	}
   305  	return size
   306  }
   307  func (m *AbfPolicyAddDel) Marshal(b []byte) ([]byte, error) {
   308  	if b == nil {
   309  		b = make([]byte, m.Size())
   310  	}
   311  	buf := codec.NewBuffer(b)
   312  	buf.EncodeBool(m.IsAdd)
   313  	buf.EncodeUint32(m.Policy.PolicyID)
   314  	buf.EncodeUint32(m.Policy.ACLIndex)
   315  	buf.EncodeUint8(uint8(len(m.Policy.Paths)))
   316  	for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
   317  		var v1 fib_types.FibPath // Paths
   318  		if j1 < len(m.Policy.Paths) {
   319  			v1 = m.Policy.Paths[j1]
   320  		}
   321  		buf.EncodeUint32(v1.SwIfIndex)
   322  		buf.EncodeUint32(v1.TableID)
   323  		buf.EncodeUint32(v1.RpfID)
   324  		buf.EncodeUint8(v1.Weight)
   325  		buf.EncodeUint8(v1.Preference)
   326  		buf.EncodeUint32(uint32(v1.Type))
   327  		buf.EncodeUint32(uint32(v1.Flags))
   328  		buf.EncodeUint32(uint32(v1.Proto))
   329  		buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
   330  		buf.EncodeUint32(v1.Nh.ViaLabel)
   331  		buf.EncodeUint32(v1.Nh.ObjID)
   332  		buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
   333  		buf.EncodeUint8(v1.NLabels)
   334  		for j2 := 0; j2 < 16; j2++ {
   335  			buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
   336  			buf.EncodeUint32(v1.LabelStack[j2].Label)
   337  			buf.EncodeUint8(v1.LabelStack[j2].TTL)
   338  			buf.EncodeUint8(v1.LabelStack[j2].Exp)
   339  		}
   340  	}
   341  	return buf.Bytes(), nil
   342  }
   343  func (m *AbfPolicyAddDel) Unmarshal(b []byte) error {
   344  	buf := codec.NewBuffer(b)
   345  	m.IsAdd = buf.DecodeBool()
   346  	m.Policy.PolicyID = buf.DecodeUint32()
   347  	m.Policy.ACLIndex = buf.DecodeUint32()
   348  	m.Policy.NPaths = buf.DecodeUint8()
   349  	m.Policy.Paths = make([]fib_types.FibPath, m.Policy.NPaths)
   350  	for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
   351  		m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
   352  		m.Policy.Paths[j1].TableID = buf.DecodeUint32()
   353  		m.Policy.Paths[j1].RpfID = buf.DecodeUint32()
   354  		m.Policy.Paths[j1].Weight = buf.DecodeUint8()
   355  		m.Policy.Paths[j1].Preference = buf.DecodeUint8()
   356  		m.Policy.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
   357  		m.Policy.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
   358  		m.Policy.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
   359  		copy(m.Policy.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
   360  		m.Policy.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
   361  		m.Policy.Paths[j1].Nh.ObjID = buf.DecodeUint32()
   362  		m.Policy.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
   363  		m.Policy.Paths[j1].NLabels = buf.DecodeUint8()
   364  		for j2 := 0; j2 < 16; j2++ {
   365  			m.Policy.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
   366  			m.Policy.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
   367  			m.Policy.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
   368  			m.Policy.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
   369  		}
   370  	}
   371  	return nil
   372  }
   373  
   374  // AbfPolicyAddDelReply defines message 'abf_policy_add_del_reply'.
   375  type AbfPolicyAddDelReply struct {
   376  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   377  }
   378  
   379  func (m *AbfPolicyAddDelReply) Reset()               { *m = AbfPolicyAddDelReply{} }
   380  func (*AbfPolicyAddDelReply) GetMessageName() string { return "abf_policy_add_del_reply" }
   381  func (*AbfPolicyAddDelReply) GetCrcString() string   { return "e8d4e804" }
   382  func (*AbfPolicyAddDelReply) GetMessageType() api.MessageType {
   383  	return api.ReplyMessage
   384  }
   385  
   386  func (m *AbfPolicyAddDelReply) Size() (size int) {
   387  	if m == nil {
   388  		return 0
   389  	}
   390  	size += 4 // m.Retval
   391  	return size
   392  }
   393  func (m *AbfPolicyAddDelReply) Marshal(b []byte) ([]byte, error) {
   394  	if b == nil {
   395  		b = make([]byte, m.Size())
   396  	}
   397  	buf := codec.NewBuffer(b)
   398  	buf.EncodeInt32(m.Retval)
   399  	return buf.Bytes(), nil
   400  }
   401  func (m *AbfPolicyAddDelReply) Unmarshal(b []byte) error {
   402  	buf := codec.NewBuffer(b)
   403  	m.Retval = buf.DecodeInt32()
   404  	return nil
   405  }
   406  
   407  // AbfPolicyDetails defines message 'abf_policy_details'.
   408  type AbfPolicyDetails struct {
   409  	Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
   410  }
   411  
   412  func (m *AbfPolicyDetails) Reset()               { *m = AbfPolicyDetails{} }
   413  func (*AbfPolicyDetails) GetMessageName() string { return "abf_policy_details" }
   414  func (*AbfPolicyDetails) GetCrcString() string   { return "6769e504" }
   415  func (*AbfPolicyDetails) GetMessageType() api.MessageType {
   416  	return api.ReplyMessage
   417  }
   418  
   419  func (m *AbfPolicyDetails) Size() (size int) {
   420  	if m == nil {
   421  		return 0
   422  	}
   423  	size += 4 // m.Policy.PolicyID
   424  	size += 4 // m.Policy.ACLIndex
   425  	size += 1 // m.Policy.NPaths
   426  	for j2 := 0; j2 < len(m.Policy.Paths); j2++ {
   427  		var s2 fib_types.FibPath
   428  		_ = s2
   429  		if j2 < len(m.Policy.Paths) {
   430  			s2 = m.Policy.Paths[j2]
   431  		}
   432  		size += 4      // s2.SwIfIndex
   433  		size += 4      // s2.TableID
   434  		size += 4      // s2.RpfID
   435  		size += 1      // s2.Weight
   436  		size += 1      // s2.Preference
   437  		size += 4      // s2.Type
   438  		size += 4      // s2.Flags
   439  		size += 4      // s2.Proto
   440  		size += 1 * 16 // s2.Nh.Address
   441  		size += 4      // s2.Nh.ViaLabel
   442  		size += 4      // s2.Nh.ObjID
   443  		size += 4      // s2.Nh.ClassifyTableIndex
   444  		size += 1      // s2.NLabels
   445  		for j3 := 0; j3 < 16; j3++ {
   446  			size += 1 // s2.LabelStack[j3].IsUniform
   447  			size += 4 // s2.LabelStack[j3].Label
   448  			size += 1 // s2.LabelStack[j3].TTL
   449  			size += 1 // s2.LabelStack[j3].Exp
   450  		}
   451  	}
   452  	return size
   453  }
   454  func (m *AbfPolicyDetails) Marshal(b []byte) ([]byte, error) {
   455  	if b == nil {
   456  		b = make([]byte, m.Size())
   457  	}
   458  	buf := codec.NewBuffer(b)
   459  	buf.EncodeUint32(m.Policy.PolicyID)
   460  	buf.EncodeUint32(m.Policy.ACLIndex)
   461  	buf.EncodeUint8(uint8(len(m.Policy.Paths)))
   462  	for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
   463  		var v1 fib_types.FibPath // Paths
   464  		if j1 < len(m.Policy.Paths) {
   465  			v1 = m.Policy.Paths[j1]
   466  		}
   467  		buf.EncodeUint32(v1.SwIfIndex)
   468  		buf.EncodeUint32(v1.TableID)
   469  		buf.EncodeUint32(v1.RpfID)
   470  		buf.EncodeUint8(v1.Weight)
   471  		buf.EncodeUint8(v1.Preference)
   472  		buf.EncodeUint32(uint32(v1.Type))
   473  		buf.EncodeUint32(uint32(v1.Flags))
   474  		buf.EncodeUint32(uint32(v1.Proto))
   475  		buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
   476  		buf.EncodeUint32(v1.Nh.ViaLabel)
   477  		buf.EncodeUint32(v1.Nh.ObjID)
   478  		buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
   479  		buf.EncodeUint8(v1.NLabels)
   480  		for j2 := 0; j2 < 16; j2++ {
   481  			buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
   482  			buf.EncodeUint32(v1.LabelStack[j2].Label)
   483  			buf.EncodeUint8(v1.LabelStack[j2].TTL)
   484  			buf.EncodeUint8(v1.LabelStack[j2].Exp)
   485  		}
   486  	}
   487  	return buf.Bytes(), nil
   488  }
   489  func (m *AbfPolicyDetails) Unmarshal(b []byte) error {
   490  	buf := codec.NewBuffer(b)
   491  	m.Policy.PolicyID = buf.DecodeUint32()
   492  	m.Policy.ACLIndex = buf.DecodeUint32()
   493  	m.Policy.NPaths = buf.DecodeUint8()
   494  	m.Policy.Paths = make([]fib_types.FibPath, m.Policy.NPaths)
   495  	for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
   496  		m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
   497  		m.Policy.Paths[j1].TableID = buf.DecodeUint32()
   498  		m.Policy.Paths[j1].RpfID = buf.DecodeUint32()
   499  		m.Policy.Paths[j1].Weight = buf.DecodeUint8()
   500  		m.Policy.Paths[j1].Preference = buf.DecodeUint8()
   501  		m.Policy.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
   502  		m.Policy.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
   503  		m.Policy.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
   504  		copy(m.Policy.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
   505  		m.Policy.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
   506  		m.Policy.Paths[j1].Nh.ObjID = buf.DecodeUint32()
   507  		m.Policy.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
   508  		m.Policy.Paths[j1].NLabels = buf.DecodeUint8()
   509  		for j2 := 0; j2 < 16; j2++ {
   510  			m.Policy.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
   511  			m.Policy.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
   512  			m.Policy.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
   513  			m.Policy.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
   514  		}
   515  	}
   516  	return nil
   517  }
   518  
   519  // AbfPolicyDump defines message 'abf_policy_dump'.
   520  type AbfPolicyDump struct{}
   521  
   522  func (m *AbfPolicyDump) Reset()               { *m = AbfPolicyDump{} }
   523  func (*AbfPolicyDump) GetMessageName() string { return "abf_policy_dump" }
   524  func (*AbfPolicyDump) GetCrcString() string   { return "51077d14" }
   525  func (*AbfPolicyDump) GetMessageType() api.MessageType {
   526  	return api.RequestMessage
   527  }
   528  
   529  func (m *AbfPolicyDump) Size() (size int) {
   530  	if m == nil {
   531  		return 0
   532  	}
   533  	return size
   534  }
   535  func (m *AbfPolicyDump) Marshal(b []byte) ([]byte, error) {
   536  	if b == nil {
   537  		b = make([]byte, m.Size())
   538  	}
   539  	buf := codec.NewBuffer(b)
   540  	return buf.Bytes(), nil
   541  }
   542  func (m *AbfPolicyDump) Unmarshal(b []byte) error {
   543  	return nil
   544  }
   545  
   546  func init() { file_abf_binapi_init() }
   547  func file_abf_binapi_init() {
   548  	api.RegisterMessage((*AbfItfAttachAddDel)(nil), "abf_itf_attach_add_del_25c8621b")
   549  	api.RegisterMessage((*AbfItfAttachAddDelReply)(nil), "abf_itf_attach_add_del_reply_e8d4e804")
   550  	api.RegisterMessage((*AbfItfAttachDetails)(nil), "abf_itf_attach_details_7819523e")
   551  	api.RegisterMessage((*AbfItfAttachDump)(nil), "abf_itf_attach_dump_51077d14")
   552  	api.RegisterMessage((*AbfPluginGetVersion)(nil), "abf_plugin_get_version_51077d14")
   553  	api.RegisterMessage((*AbfPluginGetVersionReply)(nil), "abf_plugin_get_version_reply_9b32cf86")
   554  	api.RegisterMessage((*AbfPolicyAddDel)(nil), "abf_policy_add_del_ee66f93e")
   555  	api.RegisterMessage((*AbfPolicyAddDelReply)(nil), "abf_policy_add_del_reply_e8d4e804")
   556  	api.RegisterMessage((*AbfPolicyDetails)(nil), "abf_policy_details_6769e504")
   557  	api.RegisterMessage((*AbfPolicyDump)(nil), "abf_policy_dump_51077d14")
   558  }
   559  
   560  // Messages returns list of all messages in this module.
   561  func AllMessages() []api.Message {
   562  	return []api.Message{
   563  		(*AbfItfAttachAddDel)(nil),
   564  		(*AbfItfAttachAddDelReply)(nil),
   565  		(*AbfItfAttachDetails)(nil),
   566  		(*AbfItfAttachDump)(nil),
   567  		(*AbfPluginGetVersion)(nil),
   568  		(*AbfPluginGetVersionReply)(nil),
   569  		(*AbfPolicyAddDel)(nil),
   570  		(*AbfPolicyAddDelReply)(nil),
   571  		(*AbfPolicyDetails)(nil),
   572  		(*AbfPolicyDump)(nil),
   573  	}
   574  }