github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/ip_neighbor/ip_neighbor.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.10.0-dev
     4  //  VPP:              23.10-rc0~170-g6f1548434
     5  // source: core/ip_neighbor.api.json
     6  
     7  // Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
     8  //
     9  // Contents:
    10  // -  2 enums
    11  // -  1 struct
    12  // - 20 messages
    13  package ip_neighbor
    14  
    15  import (
    16  	"strconv"
    17  
    18  	ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types"
    19  	interface_types "github.com/networkservicemesh/govpp/binapi/interface_types"
    20  	ip_types "github.com/networkservicemesh/govpp/binapi/ip_types"
    21  	api "go.fd.io/govpp/api"
    22  	codec "go.fd.io/govpp/codec"
    23  )
    24  
    25  // This is a compile-time assertion to ensure that this generated file
    26  // is compatible with the GoVPP api package it is being compiled against.
    27  // A compilation error at this line likely means your copy of the
    28  // GoVPP api package needs to be updated.
    29  const _ = api.GoVppAPIPackageIsVersion2
    30  
    31  const (
    32  	APIFile    = "ip_neighbor"
    33  	APIVersion = "1.0.1"
    34  	VersionCrc = 0x36db39bd
    35  )
    36  
    37  // IPNeighborEventFlags defines enum 'ip_neighbor_event_flags'.
    38  type IPNeighborEventFlags uint32
    39  
    40  const (
    41  	IP_NEIGHBOR_API_EVENT_FLAG_ADDED   IPNeighborEventFlags = 1
    42  	IP_NEIGHBOR_API_EVENT_FLAG_REMOVED IPNeighborEventFlags = 2
    43  )
    44  
    45  var (
    46  	IPNeighborEventFlags_name = map[uint32]string{
    47  		1: "IP_NEIGHBOR_API_EVENT_FLAG_ADDED",
    48  		2: "IP_NEIGHBOR_API_EVENT_FLAG_REMOVED",
    49  	}
    50  	IPNeighborEventFlags_value = map[string]uint32{
    51  		"IP_NEIGHBOR_API_EVENT_FLAG_ADDED":   1,
    52  		"IP_NEIGHBOR_API_EVENT_FLAG_REMOVED": 2,
    53  	}
    54  )
    55  
    56  func (x IPNeighborEventFlags) String() string {
    57  	s, ok := IPNeighborEventFlags_name[uint32(x)]
    58  	if ok {
    59  		return s
    60  	}
    61  	str := func(n uint32) string {
    62  		s, ok := IPNeighborEventFlags_name[uint32(n)]
    63  		if ok {
    64  			return s
    65  		}
    66  		return "IPNeighborEventFlags(" + strconv.Itoa(int(n)) + ")"
    67  	}
    68  	for i := uint32(0); i <= 32; i++ {
    69  		val := uint32(x)
    70  		if val&(1<<i) != 0 {
    71  			if s != "" {
    72  				s += "|"
    73  			}
    74  			s += str(1 << i)
    75  		}
    76  	}
    77  	if s == "" {
    78  		return str(uint32(x))
    79  	}
    80  	return s
    81  }
    82  
    83  // IPNeighborFlags defines enum 'ip_neighbor_flags'.
    84  type IPNeighborFlags uint8
    85  
    86  const (
    87  	IP_API_NEIGHBOR_FLAG_NONE         IPNeighborFlags = 0
    88  	IP_API_NEIGHBOR_FLAG_STATIC       IPNeighborFlags = 1
    89  	IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY IPNeighborFlags = 2
    90  )
    91  
    92  var (
    93  	IPNeighborFlags_name = map[uint8]string{
    94  		0: "IP_API_NEIGHBOR_FLAG_NONE",
    95  		1: "IP_API_NEIGHBOR_FLAG_STATIC",
    96  		2: "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY",
    97  	}
    98  	IPNeighborFlags_value = map[string]uint8{
    99  		"IP_API_NEIGHBOR_FLAG_NONE":         0,
   100  		"IP_API_NEIGHBOR_FLAG_STATIC":       1,
   101  		"IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY": 2,
   102  	}
   103  )
   104  
   105  func (x IPNeighborFlags) String() string {
   106  	s, ok := IPNeighborFlags_name[uint8(x)]
   107  	if ok {
   108  		return s
   109  	}
   110  	str := func(n uint8) string {
   111  		s, ok := IPNeighborFlags_name[uint8(n)]
   112  		if ok {
   113  			return s
   114  		}
   115  		return "IPNeighborFlags(" + strconv.Itoa(int(n)) + ")"
   116  	}
   117  	for i := uint8(0); i <= 8; i++ {
   118  		val := uint8(x)
   119  		if val&(1<<i) != 0 {
   120  			if s != "" {
   121  				s += "|"
   122  			}
   123  			s += str(1 << i)
   124  		}
   125  	}
   126  	if s == "" {
   127  		return str(uint8(x))
   128  	}
   129  	return s
   130  }
   131  
   132  // IPNeighbor defines type 'ip_neighbor'.
   133  type IPNeighbor struct {
   134  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   135  	Flags      IPNeighborFlags                `binapi:"ip_neighbor_flags,name=flags" json:"flags,omitempty"`
   136  	MacAddress ethernet_types.MacAddress      `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
   137  	IPAddress  ip_types.Address               `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
   138  }
   139  
   140  // IP neighbor add / del request
   141  //   - is_add - 1 to add neighbor, 0 to delete
   142  //   - neighbor - the neighbor to add/remove
   143  //
   144  // IPNeighborAddDel defines message 'ip_neighbor_add_del'.
   145  type IPNeighborAddDel struct {
   146  	IsAdd    bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   147  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   148  }
   149  
   150  func (m *IPNeighborAddDel) Reset()               { *m = IPNeighborAddDel{} }
   151  func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" }
   152  func (*IPNeighborAddDel) GetCrcString() string   { return "0607c257" }
   153  func (*IPNeighborAddDel) GetMessageType() api.MessageType {
   154  	return api.RequestMessage
   155  }
   156  
   157  func (m *IPNeighborAddDel) Size() (size int) {
   158  	if m == nil {
   159  		return 0
   160  	}
   161  	size += 1      // m.IsAdd
   162  	size += 4      // m.Neighbor.SwIfIndex
   163  	size += 1      // m.Neighbor.Flags
   164  	size += 1 * 6  // m.Neighbor.MacAddress
   165  	size += 1      // m.Neighbor.IPAddress.Af
   166  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   167  	return size
   168  }
   169  func (m *IPNeighborAddDel) Marshal(b []byte) ([]byte, error) {
   170  	if b == nil {
   171  		b = make([]byte, m.Size())
   172  	}
   173  	buf := codec.NewBuffer(b)
   174  	buf.EncodeBool(m.IsAdd)
   175  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   176  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   177  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   178  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   179  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   180  	return buf.Bytes(), nil
   181  }
   182  func (m *IPNeighborAddDel) Unmarshal(b []byte) error {
   183  	buf := codec.NewBuffer(b)
   184  	m.IsAdd = buf.DecodeBool()
   185  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   186  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   187  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   188  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   189  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   190  	return nil
   191  }
   192  
   193  // IP neighbor add / del reply
   194  //   - retval - return value
   195  //   - stats_index - the index to use for this neighbor in the stats segment
   196  //
   197  // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'.
   198  type IPNeighborAddDelReply struct {
   199  	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   200  	StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
   201  }
   202  
   203  func (m *IPNeighborAddDelReply) Reset()               { *m = IPNeighborAddDelReply{} }
   204  func (*IPNeighborAddDelReply) GetMessageName() string { return "ip_neighbor_add_del_reply" }
   205  func (*IPNeighborAddDelReply) GetCrcString() string   { return "1992deab" }
   206  func (*IPNeighborAddDelReply) GetMessageType() api.MessageType {
   207  	return api.ReplyMessage
   208  }
   209  
   210  func (m *IPNeighborAddDelReply) Size() (size int) {
   211  	if m == nil {
   212  		return 0
   213  	}
   214  	size += 4 // m.Retval
   215  	size += 4 // m.StatsIndex
   216  	return size
   217  }
   218  func (m *IPNeighborAddDelReply) Marshal(b []byte) ([]byte, error) {
   219  	if b == nil {
   220  		b = make([]byte, m.Size())
   221  	}
   222  	buf := codec.NewBuffer(b)
   223  	buf.EncodeInt32(m.Retval)
   224  	buf.EncodeUint32(m.StatsIndex)
   225  	return buf.Bytes(), nil
   226  }
   227  func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error {
   228  	buf := codec.NewBuffer(b)
   229  	m.Retval = buf.DecodeInt32()
   230  	m.StatsIndex = buf.DecodeUint32()
   231  	return nil
   232  }
   233  
   234  // Enable/disable periodic IP neighbor scan
   235  //   - af - Address family v4/v6
   236  //   - max_number - The maximum number of neighbours that will be created.
   237  //     default 50k
   238  //   - max_age - The maximum age (in seconds) before an inactive neighbour
   239  //     is flushed
   240  //     default 0 => never
   241  //   - recycle - If max_number of neighbours is reached and new ones need
   242  //     to be created should the oldest neighbour be 'recycled'.
   243  //
   244  // IPNeighborConfig defines message 'ip_neighbor_config'.
   245  type IPNeighborConfig struct {
   246  	Af        ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
   247  	MaxNumber uint32                 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
   248  	MaxAge    uint32                 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
   249  	Recycle   bool                   `binapi:"bool,name=recycle" json:"recycle,omitempty"`
   250  }
   251  
   252  func (m *IPNeighborConfig) Reset()               { *m = IPNeighborConfig{} }
   253  func (*IPNeighborConfig) GetMessageName() string { return "ip_neighbor_config" }
   254  func (*IPNeighborConfig) GetCrcString() string   { return "f4a5cf44" }
   255  func (*IPNeighborConfig) GetMessageType() api.MessageType {
   256  	return api.RequestMessage
   257  }
   258  
   259  func (m *IPNeighborConfig) Size() (size int) {
   260  	if m == nil {
   261  		return 0
   262  	}
   263  	size += 1 // m.Af
   264  	size += 4 // m.MaxNumber
   265  	size += 4 // m.MaxAge
   266  	size += 1 // m.Recycle
   267  	return size
   268  }
   269  func (m *IPNeighborConfig) Marshal(b []byte) ([]byte, error) {
   270  	if b == nil {
   271  		b = make([]byte, m.Size())
   272  	}
   273  	buf := codec.NewBuffer(b)
   274  	buf.EncodeUint8(uint8(m.Af))
   275  	buf.EncodeUint32(m.MaxNumber)
   276  	buf.EncodeUint32(m.MaxAge)
   277  	buf.EncodeBool(m.Recycle)
   278  	return buf.Bytes(), nil
   279  }
   280  func (m *IPNeighborConfig) Unmarshal(b []byte) error {
   281  	buf := codec.NewBuffer(b)
   282  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   283  	m.MaxNumber = buf.DecodeUint32()
   284  	m.MaxAge = buf.DecodeUint32()
   285  	m.Recycle = buf.DecodeBool()
   286  	return nil
   287  }
   288  
   289  // Get neighbor database configuration per AF
   290  //   - af - Address family (v4/v6)
   291  //
   292  // IPNeighborConfigGet defines message 'ip_neighbor_config_get'.
   293  // InProgress: the message form may change in the future versions
   294  type IPNeighborConfigGet struct {
   295  	Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
   296  }
   297  
   298  func (m *IPNeighborConfigGet) Reset()               { *m = IPNeighborConfigGet{} }
   299  func (*IPNeighborConfigGet) GetMessageName() string { return "ip_neighbor_config_get" }
   300  func (*IPNeighborConfigGet) GetCrcString() string   { return "a5db7bf7" }
   301  func (*IPNeighborConfigGet) GetMessageType() api.MessageType {
   302  	return api.RequestMessage
   303  }
   304  
   305  func (m *IPNeighborConfigGet) Size() (size int) {
   306  	if m == nil {
   307  		return 0
   308  	}
   309  	size += 1 // m.Af
   310  	return size
   311  }
   312  func (m *IPNeighborConfigGet) Marshal(b []byte) ([]byte, error) {
   313  	if b == nil {
   314  		b = make([]byte, m.Size())
   315  	}
   316  	buf := codec.NewBuffer(b)
   317  	buf.EncodeUint8(uint8(m.Af))
   318  	return buf.Bytes(), nil
   319  }
   320  func (m *IPNeighborConfigGet) Unmarshal(b []byte) error {
   321  	buf := codec.NewBuffer(b)
   322  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   323  	return nil
   324  }
   325  
   326  // Neighbor database configuration reply
   327  //   - retval - error (0 is "no error")
   328  //   - af - Address family (v4/v6)
   329  //   - max_number - The maximum number of neighbours that will be created
   330  //   - max_age - The maximum age (in seconds) before an inactive neighbour
   331  //     is flushed
   332  //   - recycle - If max_number of neighbours is reached and new ones need
   333  //     to be created, should the oldest neighbour be 'recycled'
   334  //
   335  // IPNeighborConfigGetReply defines message 'ip_neighbor_config_get_reply'.
   336  // InProgress: the message form may change in the future versions
   337  type IPNeighborConfigGetReply struct {
   338  	Retval    int32                  `binapi:"i32,name=retval" json:"retval,omitempty"`
   339  	Af        ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
   340  	MaxNumber uint32                 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
   341  	MaxAge    uint32                 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
   342  	Recycle   bool                   `binapi:"bool,name=recycle" json:"recycle,omitempty"`
   343  }
   344  
   345  func (m *IPNeighborConfigGetReply) Reset()               { *m = IPNeighborConfigGetReply{} }
   346  func (*IPNeighborConfigGetReply) GetMessageName() string { return "ip_neighbor_config_get_reply" }
   347  func (*IPNeighborConfigGetReply) GetCrcString() string   { return "798e6fdd" }
   348  func (*IPNeighborConfigGetReply) GetMessageType() api.MessageType {
   349  	return api.ReplyMessage
   350  }
   351  
   352  func (m *IPNeighborConfigGetReply) Size() (size int) {
   353  	if m == nil {
   354  		return 0
   355  	}
   356  	size += 4 // m.Retval
   357  	size += 1 // m.Af
   358  	size += 4 // m.MaxNumber
   359  	size += 4 // m.MaxAge
   360  	size += 1 // m.Recycle
   361  	return size
   362  }
   363  func (m *IPNeighborConfigGetReply) Marshal(b []byte) ([]byte, error) {
   364  	if b == nil {
   365  		b = make([]byte, m.Size())
   366  	}
   367  	buf := codec.NewBuffer(b)
   368  	buf.EncodeInt32(m.Retval)
   369  	buf.EncodeUint8(uint8(m.Af))
   370  	buf.EncodeUint32(m.MaxNumber)
   371  	buf.EncodeUint32(m.MaxAge)
   372  	buf.EncodeBool(m.Recycle)
   373  	return buf.Bytes(), nil
   374  }
   375  func (m *IPNeighborConfigGetReply) Unmarshal(b []byte) error {
   376  	buf := codec.NewBuffer(b)
   377  	m.Retval = buf.DecodeInt32()
   378  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   379  	m.MaxNumber = buf.DecodeUint32()
   380  	m.MaxAge = buf.DecodeUint32()
   381  	m.Recycle = buf.DecodeBool()
   382  	return nil
   383  }
   384  
   385  // IPNeighborConfigReply defines message 'ip_neighbor_config_reply'.
   386  type IPNeighborConfigReply struct {
   387  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   388  }
   389  
   390  func (m *IPNeighborConfigReply) Reset()               { *m = IPNeighborConfigReply{} }
   391  func (*IPNeighborConfigReply) GetMessageName() string { return "ip_neighbor_config_reply" }
   392  func (*IPNeighborConfigReply) GetCrcString() string   { return "e8d4e804" }
   393  func (*IPNeighborConfigReply) GetMessageType() api.MessageType {
   394  	return api.ReplyMessage
   395  }
   396  
   397  func (m *IPNeighborConfigReply) Size() (size int) {
   398  	if m == nil {
   399  		return 0
   400  	}
   401  	size += 4 // m.Retval
   402  	return size
   403  }
   404  func (m *IPNeighborConfigReply) Marshal(b []byte) ([]byte, error) {
   405  	if b == nil {
   406  		b = make([]byte, m.Size())
   407  	}
   408  	buf := codec.NewBuffer(b)
   409  	buf.EncodeInt32(m.Retval)
   410  	return buf.Bytes(), nil
   411  }
   412  func (m *IPNeighborConfigReply) Unmarshal(b []byte) error {
   413  	buf := codec.NewBuffer(b)
   414  	m.Retval = buf.DecodeInt32()
   415  	return nil
   416  }
   417  
   418  // IP neighbors dump response
   419  //   - age - time between last update and sending this message, in seconds
   420  //   - neighbour - the neighbor
   421  //
   422  // IPNeighborDetails defines message 'ip_neighbor_details'.
   423  type IPNeighborDetails struct {
   424  	Age      float64    `binapi:"f64,name=age" json:"age,omitempty"`
   425  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   426  }
   427  
   428  func (m *IPNeighborDetails) Reset()               { *m = IPNeighborDetails{} }
   429  func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
   430  func (*IPNeighborDetails) GetCrcString() string   { return "e29d79f0" }
   431  func (*IPNeighborDetails) GetMessageType() api.MessageType {
   432  	return api.ReplyMessage
   433  }
   434  
   435  func (m *IPNeighborDetails) Size() (size int) {
   436  	if m == nil {
   437  		return 0
   438  	}
   439  	size += 8      // m.Age
   440  	size += 4      // m.Neighbor.SwIfIndex
   441  	size += 1      // m.Neighbor.Flags
   442  	size += 1 * 6  // m.Neighbor.MacAddress
   443  	size += 1      // m.Neighbor.IPAddress.Af
   444  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   445  	return size
   446  }
   447  func (m *IPNeighborDetails) Marshal(b []byte) ([]byte, error) {
   448  	if b == nil {
   449  		b = make([]byte, m.Size())
   450  	}
   451  	buf := codec.NewBuffer(b)
   452  	buf.EncodeFloat64(m.Age)
   453  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   454  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   455  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   456  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   457  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   458  	return buf.Bytes(), nil
   459  }
   460  func (m *IPNeighborDetails) Unmarshal(b []byte) error {
   461  	buf := codec.NewBuffer(b)
   462  	m.Age = buf.DecodeFloat64()
   463  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   464  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   465  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   466  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   467  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   468  	return nil
   469  }
   470  
   471  // Dump IP neighbors
   472  //   - sw_if_index - the interface to dump neighbors, ~0 == all
   473  //   - af - address family is ipv[6|4]
   474  //
   475  // IPNeighborDump defines message 'ip_neighbor_dump'.
   476  type IPNeighborDump struct {
   477  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   478  	Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
   479  }
   480  
   481  func (m *IPNeighborDump) Reset()               { *m = IPNeighborDump{} }
   482  func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
   483  func (*IPNeighborDump) GetCrcString() string   { return "d817a484" }
   484  func (*IPNeighborDump) GetMessageType() api.MessageType {
   485  	return api.RequestMessage
   486  }
   487  
   488  func (m *IPNeighborDump) Size() (size int) {
   489  	if m == nil {
   490  		return 0
   491  	}
   492  	size += 4 // m.SwIfIndex
   493  	size += 1 // m.Af
   494  	return size
   495  }
   496  func (m *IPNeighborDump) Marshal(b []byte) ([]byte, error) {
   497  	if b == nil {
   498  		b = make([]byte, m.Size())
   499  	}
   500  	buf := codec.NewBuffer(b)
   501  	buf.EncodeUint32(uint32(m.SwIfIndex))
   502  	buf.EncodeUint8(uint8(m.Af))
   503  	return buf.Bytes(), nil
   504  }
   505  func (m *IPNeighborDump) Unmarshal(b []byte) error {
   506  	buf := codec.NewBuffer(b)
   507  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   508  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   509  	return nil
   510  }
   511  
   512  // Tell client about an IP4 ARP resolution event or
   513  //
   514  //	       MAC/IP info from ARP requests in L2 BDs
   515  //	- pid - client pid registered to receive notification
   516  //	- neighbor - new neighbor created
   517  //
   518  // IPNeighborEvent defines message 'ip_neighbor_event'.
   519  // Deprecated: the message will be removed in the future versions
   520  type IPNeighborEvent struct {
   521  	PID      uint32     `binapi:"u32,name=pid" json:"pid,omitempty"`
   522  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   523  }
   524  
   525  func (m *IPNeighborEvent) Reset()               { *m = IPNeighborEvent{} }
   526  func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
   527  func (*IPNeighborEvent) GetCrcString() string   { return "bdb092b2" }
   528  func (*IPNeighborEvent) GetMessageType() api.MessageType {
   529  	return api.EventMessage
   530  }
   531  
   532  func (m *IPNeighborEvent) Size() (size int) {
   533  	if m == nil {
   534  		return 0
   535  	}
   536  	size += 4      // m.PID
   537  	size += 4      // m.Neighbor.SwIfIndex
   538  	size += 1      // m.Neighbor.Flags
   539  	size += 1 * 6  // m.Neighbor.MacAddress
   540  	size += 1      // m.Neighbor.IPAddress.Af
   541  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   542  	return size
   543  }
   544  func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
   545  	if b == nil {
   546  		b = make([]byte, m.Size())
   547  	}
   548  	buf := codec.NewBuffer(b)
   549  	buf.EncodeUint32(m.PID)
   550  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   551  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   552  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   553  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   554  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   555  	return buf.Bytes(), nil
   556  }
   557  func (m *IPNeighborEvent) Unmarshal(b []byte) error {
   558  	buf := codec.NewBuffer(b)
   559  	m.PID = buf.DecodeUint32()
   560  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   561  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   562  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   563  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   564  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   565  	return nil
   566  }
   567  
   568  // Tell client about an IP4 ARP resolution event or
   569  //
   570  //	       MAC/IP info from ARP requests in L2 BDs
   571  //	- pid - client pid registered to receive notification
   572  //	- flags - Flags
   573  //	- neighbor -  neighbor
   574  //
   575  // IPNeighborEventV2 defines message 'ip_neighbor_event_v2'.
   576  type IPNeighborEventV2 struct {
   577  	PID      uint32               `binapi:"u32,name=pid" json:"pid,omitempty"`
   578  	Flags    IPNeighborEventFlags `binapi:"ip_neighbor_event_flags,name=flags" json:"flags,omitempty"`
   579  	Neighbor IPNeighbor           `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   580  }
   581  
   582  func (m *IPNeighborEventV2) Reset()               { *m = IPNeighborEventV2{} }
   583  func (*IPNeighborEventV2) GetMessageName() string { return "ip_neighbor_event_v2" }
   584  func (*IPNeighborEventV2) GetCrcString() string   { return "c1d53dc0" }
   585  func (*IPNeighborEventV2) GetMessageType() api.MessageType {
   586  	return api.EventMessage
   587  }
   588  
   589  func (m *IPNeighborEventV2) Size() (size int) {
   590  	if m == nil {
   591  		return 0
   592  	}
   593  	size += 4      // m.PID
   594  	size += 4      // m.Flags
   595  	size += 4      // m.Neighbor.SwIfIndex
   596  	size += 1      // m.Neighbor.Flags
   597  	size += 1 * 6  // m.Neighbor.MacAddress
   598  	size += 1      // m.Neighbor.IPAddress.Af
   599  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   600  	return size
   601  }
   602  func (m *IPNeighborEventV2) Marshal(b []byte) ([]byte, error) {
   603  	if b == nil {
   604  		b = make([]byte, m.Size())
   605  	}
   606  	buf := codec.NewBuffer(b)
   607  	buf.EncodeUint32(m.PID)
   608  	buf.EncodeUint32(uint32(m.Flags))
   609  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   610  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   611  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   612  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   613  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   614  	return buf.Bytes(), nil
   615  }
   616  func (m *IPNeighborEventV2) Unmarshal(b []byte) error {
   617  	buf := codec.NewBuffer(b)
   618  	m.PID = buf.DecodeUint32()
   619  	m.Flags = IPNeighborEventFlags(buf.DecodeUint32())
   620  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   621  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   622  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   623  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   624  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   625  	return nil
   626  }
   627  
   628  // IP neighbor flush request - removes *all* neighbours.
   629  //
   630  //	 dynamic and static from API/CLI and dynamic from data-plane.
   631  //	- af - Flush neighbours of this address family
   632  //	- sw_if_index - Flush on this interface (~0 => all interfaces)
   633  //
   634  // IPNeighborFlush defines message 'ip_neighbor_flush'.
   635  type IPNeighborFlush struct {
   636  	Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
   637  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   638  }
   639  
   640  func (m *IPNeighborFlush) Reset()               { *m = IPNeighborFlush{} }
   641  func (*IPNeighborFlush) GetMessageName() string { return "ip_neighbor_flush" }
   642  func (*IPNeighborFlush) GetCrcString() string   { return "16aa35d2" }
   643  func (*IPNeighborFlush) GetMessageType() api.MessageType {
   644  	return api.RequestMessage
   645  }
   646  
   647  func (m *IPNeighborFlush) Size() (size int) {
   648  	if m == nil {
   649  		return 0
   650  	}
   651  	size += 1 // m.Af
   652  	size += 4 // m.SwIfIndex
   653  	return size
   654  }
   655  func (m *IPNeighborFlush) Marshal(b []byte) ([]byte, error) {
   656  	if b == nil {
   657  		b = make([]byte, m.Size())
   658  	}
   659  	buf := codec.NewBuffer(b)
   660  	buf.EncodeUint8(uint8(m.Af))
   661  	buf.EncodeUint32(uint32(m.SwIfIndex))
   662  	return buf.Bytes(), nil
   663  }
   664  func (m *IPNeighborFlush) Unmarshal(b []byte) error {
   665  	buf := codec.NewBuffer(b)
   666  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   667  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   668  	return nil
   669  }
   670  
   671  // IPNeighborFlushReply defines message 'ip_neighbor_flush_reply'.
   672  type IPNeighborFlushReply struct {
   673  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   674  }
   675  
   676  func (m *IPNeighborFlushReply) Reset()               { *m = IPNeighborFlushReply{} }
   677  func (*IPNeighborFlushReply) GetMessageName() string { return "ip_neighbor_flush_reply" }
   678  func (*IPNeighborFlushReply) GetCrcString() string   { return "e8d4e804" }
   679  func (*IPNeighborFlushReply) GetMessageType() api.MessageType {
   680  	return api.ReplyMessage
   681  }
   682  
   683  func (m *IPNeighborFlushReply) Size() (size int) {
   684  	if m == nil {
   685  		return 0
   686  	}
   687  	size += 4 // m.Retval
   688  	return size
   689  }
   690  func (m *IPNeighborFlushReply) Marshal(b []byte) ([]byte, error) {
   691  	if b == nil {
   692  		b = make([]byte, m.Size())
   693  	}
   694  	buf := codec.NewBuffer(b)
   695  	buf.EncodeInt32(m.Retval)
   696  	return buf.Bytes(), nil
   697  }
   698  func (m *IPNeighborFlushReply) Unmarshal(b []byte) error {
   699  	buf := codec.NewBuffer(b)
   700  	m.Retval = buf.DecodeInt32()
   701  	return nil
   702  }
   703  
   704  // IP neighbour replace begin
   705  //
   706  //	The use-case is that, for some unspecified reason, the control plane
   707  //	has a different set of neighbours it than VPP
   708  //	currently has. The CP would thus like to 'replace' VPP's set
   709  //	only by specifying what the new set shall be, i.e. it is not
   710  //	going to delete anything that already exists, rather, it wants any
   711  //	unspecified neighbors deleted implicitly.
   712  //	The CP declares the start of this procedure with this replace_begin
   713  //	API Call, and when it has populated all neighbours it wants, it calls
   714  //	the below replace_end API. From this point on it is of course free
   715  //	to add and delete neighbours as usual.
   716  //	The underlying mechanism by which VPP implements this replace is
   717  //	intentionally left unspecified.
   718  //
   719  // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'.
   720  type IPNeighborReplaceBegin struct{}
   721  
   722  func (m *IPNeighborReplaceBegin) Reset()               { *m = IPNeighborReplaceBegin{} }
   723  func (*IPNeighborReplaceBegin) GetMessageName() string { return "ip_neighbor_replace_begin" }
   724  func (*IPNeighborReplaceBegin) GetCrcString() string   { return "51077d14" }
   725  func (*IPNeighborReplaceBegin) GetMessageType() api.MessageType {
   726  	return api.RequestMessage
   727  }
   728  
   729  func (m *IPNeighborReplaceBegin) Size() (size int) {
   730  	if m == nil {
   731  		return 0
   732  	}
   733  	return size
   734  }
   735  func (m *IPNeighborReplaceBegin) Marshal(b []byte) ([]byte, error) {
   736  	if b == nil {
   737  		b = make([]byte, m.Size())
   738  	}
   739  	buf := codec.NewBuffer(b)
   740  	return buf.Bytes(), nil
   741  }
   742  func (m *IPNeighborReplaceBegin) Unmarshal(b []byte) error {
   743  	return nil
   744  }
   745  
   746  // IPNeighborReplaceBeginReply defines message 'ip_neighbor_replace_begin_reply'.
   747  type IPNeighborReplaceBeginReply struct {
   748  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   749  }
   750  
   751  func (m *IPNeighborReplaceBeginReply) Reset()               { *m = IPNeighborReplaceBeginReply{} }
   752  func (*IPNeighborReplaceBeginReply) GetMessageName() string { return "ip_neighbor_replace_begin_reply" }
   753  func (*IPNeighborReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
   754  func (*IPNeighborReplaceBeginReply) GetMessageType() api.MessageType {
   755  	return api.ReplyMessage
   756  }
   757  
   758  func (m *IPNeighborReplaceBeginReply) Size() (size int) {
   759  	if m == nil {
   760  		return 0
   761  	}
   762  	size += 4 // m.Retval
   763  	return size
   764  }
   765  func (m *IPNeighborReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
   766  	if b == nil {
   767  		b = make([]byte, m.Size())
   768  	}
   769  	buf := codec.NewBuffer(b)
   770  	buf.EncodeInt32(m.Retval)
   771  	return buf.Bytes(), nil
   772  }
   773  func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error {
   774  	buf := codec.NewBuffer(b)
   775  	m.Retval = buf.DecodeInt32()
   776  	return nil
   777  }
   778  
   779  // IP neighbour replace end
   780  //
   781  //	see ip_neighbor_replace_begin description.
   782  //
   783  // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'.
   784  type IPNeighborReplaceEnd struct{}
   785  
   786  func (m *IPNeighborReplaceEnd) Reset()               { *m = IPNeighborReplaceEnd{} }
   787  func (*IPNeighborReplaceEnd) GetMessageName() string { return "ip_neighbor_replace_end" }
   788  func (*IPNeighborReplaceEnd) GetCrcString() string   { return "51077d14" }
   789  func (*IPNeighborReplaceEnd) GetMessageType() api.MessageType {
   790  	return api.RequestMessage
   791  }
   792  
   793  func (m *IPNeighborReplaceEnd) Size() (size int) {
   794  	if m == nil {
   795  		return 0
   796  	}
   797  	return size
   798  }
   799  func (m *IPNeighborReplaceEnd) Marshal(b []byte) ([]byte, error) {
   800  	if b == nil {
   801  		b = make([]byte, m.Size())
   802  	}
   803  	buf := codec.NewBuffer(b)
   804  	return buf.Bytes(), nil
   805  }
   806  func (m *IPNeighborReplaceEnd) Unmarshal(b []byte) error {
   807  	return nil
   808  }
   809  
   810  // IPNeighborReplaceEndReply defines message 'ip_neighbor_replace_end_reply'.
   811  type IPNeighborReplaceEndReply struct {
   812  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   813  }
   814  
   815  func (m *IPNeighborReplaceEndReply) Reset()               { *m = IPNeighborReplaceEndReply{} }
   816  func (*IPNeighborReplaceEndReply) GetMessageName() string { return "ip_neighbor_replace_end_reply" }
   817  func (*IPNeighborReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
   818  func (*IPNeighborReplaceEndReply) GetMessageType() api.MessageType {
   819  	return api.ReplyMessage
   820  }
   821  
   822  func (m *IPNeighborReplaceEndReply) Size() (size int) {
   823  	if m == nil {
   824  		return 0
   825  	}
   826  	size += 4 // m.Retval
   827  	return size
   828  }
   829  func (m *IPNeighborReplaceEndReply) Marshal(b []byte) ([]byte, error) {
   830  	if b == nil {
   831  		b = make([]byte, m.Size())
   832  	}
   833  	buf := codec.NewBuffer(b)
   834  	buf.EncodeInt32(m.Retval)
   835  	return buf.Bytes(), nil
   836  }
   837  func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
   838  	buf := codec.NewBuffer(b)
   839  	m.Retval = buf.DecodeInt32()
   840  	return nil
   841  }
   842  
   843  // Register for IP neighbour events creation
   844  //   - enable - 1 => register for events, 0 => cancel registration
   845  //   - pid - sender's pid
   846  //   - ip - exact IP address of interested neighbor resolution event
   847  //   - sw_if_index - interface on which the IP address is present.
   848  //
   849  // WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
   850  // Deprecated: the message will be removed in the future versions
   851  type WantIPNeighborEvents struct {
   852  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   853  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
   854  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
   855  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   856  }
   857  
   858  func (m *WantIPNeighborEvents) Reset()               { *m = WantIPNeighborEvents{} }
   859  func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
   860  func (*WantIPNeighborEvents) GetCrcString() string   { return "73e70a86" }
   861  func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
   862  	return api.RequestMessage
   863  }
   864  
   865  func (m *WantIPNeighborEvents) Size() (size int) {
   866  	if m == nil {
   867  		return 0
   868  	}
   869  	size += 1      // m.Enable
   870  	size += 4      // m.PID
   871  	size += 1      // m.IP.Af
   872  	size += 1 * 16 // m.IP.Un
   873  	size += 4      // m.SwIfIndex
   874  	return size
   875  }
   876  func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
   877  	if b == nil {
   878  		b = make([]byte, m.Size())
   879  	}
   880  	buf := codec.NewBuffer(b)
   881  	buf.EncodeBool(m.Enable)
   882  	buf.EncodeUint32(m.PID)
   883  	buf.EncodeUint8(uint8(m.IP.Af))
   884  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
   885  	buf.EncodeUint32(uint32(m.SwIfIndex))
   886  	return buf.Bytes(), nil
   887  }
   888  func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
   889  	buf := codec.NewBuffer(b)
   890  	m.Enable = buf.DecodeBool()
   891  	m.PID = buf.DecodeUint32()
   892  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   893  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   894  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   895  	return nil
   896  }
   897  
   898  // WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
   899  // Deprecated: the message will be removed in the future versions
   900  type WantIPNeighborEventsReply struct {
   901  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   902  }
   903  
   904  func (m *WantIPNeighborEventsReply) Reset()               { *m = WantIPNeighborEventsReply{} }
   905  func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
   906  func (*WantIPNeighborEventsReply) GetCrcString() string   { return "e8d4e804" }
   907  func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
   908  	return api.ReplyMessage
   909  }
   910  
   911  func (m *WantIPNeighborEventsReply) Size() (size int) {
   912  	if m == nil {
   913  		return 0
   914  	}
   915  	size += 4 // m.Retval
   916  	return size
   917  }
   918  func (m *WantIPNeighborEventsReply) Marshal(b []byte) ([]byte, error) {
   919  	if b == nil {
   920  		b = make([]byte, m.Size())
   921  	}
   922  	buf := codec.NewBuffer(b)
   923  	buf.EncodeInt32(m.Retval)
   924  	return buf.Bytes(), nil
   925  }
   926  func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
   927  	buf := codec.NewBuffer(b)
   928  	m.Retval = buf.DecodeInt32()
   929  	return nil
   930  }
   931  
   932  // Register for IP neighbour events (creation or deletion)
   933  //   - enable - 1 => register for events, 0 => cancel registration
   934  //   - pid - sender's pid
   935  //   - ip - exact IP address of interested neighbor resolution event
   936  //   - sw_if_index - interface on which the IP address is present.
   937  //
   938  // WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'.
   939  type WantIPNeighborEventsV2 struct {
   940  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   941  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
   942  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
   943  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   944  }
   945  
   946  func (m *WantIPNeighborEventsV2) Reset()               { *m = WantIPNeighborEventsV2{} }
   947  func (*WantIPNeighborEventsV2) GetMessageName() string { return "want_ip_neighbor_events_v2" }
   948  func (*WantIPNeighborEventsV2) GetCrcString() string   { return "73e70a86" }
   949  func (*WantIPNeighborEventsV2) GetMessageType() api.MessageType {
   950  	return api.RequestMessage
   951  }
   952  
   953  func (m *WantIPNeighborEventsV2) Size() (size int) {
   954  	if m == nil {
   955  		return 0
   956  	}
   957  	size += 1      // m.Enable
   958  	size += 4      // m.PID
   959  	size += 1      // m.IP.Af
   960  	size += 1 * 16 // m.IP.Un
   961  	size += 4      // m.SwIfIndex
   962  	return size
   963  }
   964  func (m *WantIPNeighborEventsV2) Marshal(b []byte) ([]byte, error) {
   965  	if b == nil {
   966  		b = make([]byte, m.Size())
   967  	}
   968  	buf := codec.NewBuffer(b)
   969  	buf.EncodeBool(m.Enable)
   970  	buf.EncodeUint32(m.PID)
   971  	buf.EncodeUint8(uint8(m.IP.Af))
   972  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
   973  	buf.EncodeUint32(uint32(m.SwIfIndex))
   974  	return buf.Bytes(), nil
   975  }
   976  func (m *WantIPNeighborEventsV2) Unmarshal(b []byte) error {
   977  	buf := codec.NewBuffer(b)
   978  	m.Enable = buf.DecodeBool()
   979  	m.PID = buf.DecodeUint32()
   980  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   981  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   982  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   983  	return nil
   984  }
   985  
   986  // WantIPNeighborEventsV2Reply defines message 'want_ip_neighbor_events_v2_reply'.
   987  type WantIPNeighborEventsV2Reply struct {
   988  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   989  }
   990  
   991  func (m *WantIPNeighborEventsV2Reply) Reset() { *m = WantIPNeighborEventsV2Reply{} }
   992  func (*WantIPNeighborEventsV2Reply) GetMessageName() string {
   993  	return "want_ip_neighbor_events_v2_reply"
   994  }
   995  func (*WantIPNeighborEventsV2Reply) GetCrcString() string { return "e8d4e804" }
   996  func (*WantIPNeighborEventsV2Reply) GetMessageType() api.MessageType {
   997  	return api.ReplyMessage
   998  }
   999  
  1000  func (m *WantIPNeighborEventsV2Reply) Size() (size int) {
  1001  	if m == nil {
  1002  		return 0
  1003  	}
  1004  	size += 4 // m.Retval
  1005  	return size
  1006  }
  1007  func (m *WantIPNeighborEventsV2Reply) Marshal(b []byte) ([]byte, error) {
  1008  	if b == nil {
  1009  		b = make([]byte, m.Size())
  1010  	}
  1011  	buf := codec.NewBuffer(b)
  1012  	buf.EncodeInt32(m.Retval)
  1013  	return buf.Bytes(), nil
  1014  }
  1015  func (m *WantIPNeighborEventsV2Reply) Unmarshal(b []byte) error {
  1016  	buf := codec.NewBuffer(b)
  1017  	m.Retval = buf.DecodeInt32()
  1018  	return nil
  1019  }
  1020  
  1021  func init() { file_ip_neighbor_binapi_init() }
  1022  func file_ip_neighbor_binapi_init() {
  1023  	api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_0607c257")
  1024  	api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
  1025  	api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
  1026  	api.RegisterMessage((*IPNeighborConfigGet)(nil), "ip_neighbor_config_get_a5db7bf7")
  1027  	api.RegisterMessage((*IPNeighborConfigGetReply)(nil), "ip_neighbor_config_get_reply_798e6fdd")
  1028  	api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
  1029  	api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_e29d79f0")
  1030  	api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_d817a484")
  1031  	api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_bdb092b2")
  1032  	api.RegisterMessage((*IPNeighborEventV2)(nil), "ip_neighbor_event_v2_c1d53dc0")
  1033  	api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
  1034  	api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
  1035  	api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
  1036  	api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
  1037  	api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
  1038  	api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
  1039  	api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_73e70a86")
  1040  	api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
  1041  	api.RegisterMessage((*WantIPNeighborEventsV2)(nil), "want_ip_neighbor_events_v2_73e70a86")
  1042  	api.RegisterMessage((*WantIPNeighborEventsV2Reply)(nil), "want_ip_neighbor_events_v2_reply_e8d4e804")
  1043  }
  1044  
  1045  // Messages returns list of all messages in this module.
  1046  func AllMessages() []api.Message {
  1047  	return []api.Message{
  1048  		(*IPNeighborAddDel)(nil),
  1049  		(*IPNeighborAddDelReply)(nil),
  1050  		(*IPNeighborConfig)(nil),
  1051  		(*IPNeighborConfigGet)(nil),
  1052  		(*IPNeighborConfigGetReply)(nil),
  1053  		(*IPNeighborConfigReply)(nil),
  1054  		(*IPNeighborDetails)(nil),
  1055  		(*IPNeighborDump)(nil),
  1056  		(*IPNeighborEvent)(nil),
  1057  		(*IPNeighborEventV2)(nil),
  1058  		(*IPNeighborFlush)(nil),
  1059  		(*IPNeighborFlushReply)(nil),
  1060  		(*IPNeighborReplaceBegin)(nil),
  1061  		(*IPNeighborReplaceBeginReply)(nil),
  1062  		(*IPNeighborReplaceEnd)(nil),
  1063  		(*IPNeighborReplaceEndReply)(nil),
  1064  		(*WantIPNeighborEvents)(nil),
  1065  		(*WantIPNeighborEventsReply)(nil),
  1066  		(*WantIPNeighborEventsV2)(nil),
  1067  		(*WantIPNeighborEventsV2Reply)(nil),
  1068  	}
  1069  }