github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/abf/abf.ba.go (about)

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