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

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
     4  //
     5  // Contents:
     6  // -  2 enums
     7  // -  1 struct
     8  // - 18 messages
     9  package ip_neighbor
    10  
    11  import (
    12  	"strconv"
    13  
    14  	api "go.fd.io/govpp/api"
    15  	codec "go.fd.io/govpp/codec"
    16  	ethernet_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ethernet_types"
    17  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types"
    18  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ip_types"
    19  )
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the GoVPP api package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // GoVPP api package needs to be updated.
    25  const _ = api.GoVppAPIPackageIsVersion2
    26  
    27  const (
    28  	APIFile    = "ip_neighbor"
    29  	APIVersion = "1.0.0"
    30  	VersionCrc = 0xda761d45
    31  )
    32  
    33  // IPNeighborEventFlags defines enum 'ip_neighbor_event_flags'.
    34  type IPNeighborEventFlags uint32
    35  
    36  const (
    37  	IP_NEIGHBOR_API_EVENT_FLAG_ADDED   IPNeighborEventFlags = 1
    38  	IP_NEIGHBOR_API_EVENT_FLAG_REMOVED IPNeighborEventFlags = 2
    39  )
    40  
    41  var (
    42  	IPNeighborEventFlags_name = map[uint32]string{
    43  		1: "IP_NEIGHBOR_API_EVENT_FLAG_ADDED",
    44  		2: "IP_NEIGHBOR_API_EVENT_FLAG_REMOVED",
    45  	}
    46  	IPNeighborEventFlags_value = map[string]uint32{
    47  		"IP_NEIGHBOR_API_EVENT_FLAG_ADDED":   1,
    48  		"IP_NEIGHBOR_API_EVENT_FLAG_REMOVED": 2,
    49  	}
    50  )
    51  
    52  func (x IPNeighborEventFlags) String() string {
    53  	s, ok := IPNeighborEventFlags_name[uint32(x)]
    54  	if ok {
    55  		return s
    56  	}
    57  	str := func(n uint32) string {
    58  		s, ok := IPNeighborEventFlags_name[uint32(n)]
    59  		if ok {
    60  			return s
    61  		}
    62  		return "IPNeighborEventFlags(" + strconv.Itoa(int(n)) + ")"
    63  	}
    64  	for i := uint32(0); i <= 32; i++ {
    65  		val := uint32(x)
    66  		if val&(1<<i) != 0 {
    67  			if s != "" {
    68  				s += "|"
    69  			}
    70  			s += str(1 << i)
    71  		}
    72  	}
    73  	if s == "" {
    74  		return str(uint32(x))
    75  	}
    76  	return s
    77  }
    78  
    79  // IPNeighborFlags defines enum 'ip_neighbor_flags'.
    80  type IPNeighborFlags uint8
    81  
    82  const (
    83  	IP_API_NEIGHBOR_FLAG_NONE         IPNeighborFlags = 0
    84  	IP_API_NEIGHBOR_FLAG_STATIC       IPNeighborFlags = 1
    85  	IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY IPNeighborFlags = 2
    86  )
    87  
    88  var (
    89  	IPNeighborFlags_name = map[uint8]string{
    90  		0: "IP_API_NEIGHBOR_FLAG_NONE",
    91  		1: "IP_API_NEIGHBOR_FLAG_STATIC",
    92  		2: "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY",
    93  	}
    94  	IPNeighborFlags_value = map[string]uint8{
    95  		"IP_API_NEIGHBOR_FLAG_NONE":         0,
    96  		"IP_API_NEIGHBOR_FLAG_STATIC":       1,
    97  		"IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY": 2,
    98  	}
    99  )
   100  
   101  func (x IPNeighborFlags) String() string {
   102  	s, ok := IPNeighborFlags_name[uint8(x)]
   103  	if ok {
   104  		return s
   105  	}
   106  	str := func(n uint8) string {
   107  		s, ok := IPNeighborFlags_name[uint8(n)]
   108  		if ok {
   109  			return s
   110  		}
   111  		return "IPNeighborFlags(" + strconv.Itoa(int(n)) + ")"
   112  	}
   113  	for i := uint8(0); i <= 8; i++ {
   114  		val := uint8(x)
   115  		if val&(1<<i) != 0 {
   116  			if s != "" {
   117  				s += "|"
   118  			}
   119  			s += str(1 << i)
   120  		}
   121  	}
   122  	if s == "" {
   123  		return str(uint8(x))
   124  	}
   125  	return s
   126  }
   127  
   128  // IPNeighbor defines type 'ip_neighbor'.
   129  type IPNeighbor struct {
   130  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   131  	Flags      IPNeighborFlags                `binapi:"ip_neighbor_flags,name=flags" json:"flags,omitempty"`
   132  	MacAddress ethernet_types.MacAddress      `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
   133  	IPAddress  ip_types.Address               `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
   134  }
   135  
   136  // IPNeighborAddDel defines message 'ip_neighbor_add_del'.
   137  type IPNeighborAddDel struct {
   138  	IsAdd    bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   139  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   140  }
   141  
   142  func (m *IPNeighborAddDel) Reset()               { *m = IPNeighborAddDel{} }
   143  func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" }
   144  func (*IPNeighborAddDel) GetCrcString() string   { return "105518b6" }
   145  func (*IPNeighborAddDel) GetMessageType() api.MessageType {
   146  	return api.RequestMessage
   147  }
   148  
   149  func (m *IPNeighborAddDel) Size() (size int) {
   150  	if m == nil {
   151  		return 0
   152  	}
   153  	size += 1      // m.IsAdd
   154  	size += 4      // m.Neighbor.SwIfIndex
   155  	size += 1      // m.Neighbor.Flags
   156  	size += 1 * 6  // m.Neighbor.MacAddress
   157  	size += 1      // m.Neighbor.IPAddress.Af
   158  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   159  	return size
   160  }
   161  func (m *IPNeighborAddDel) Marshal(b []byte) ([]byte, error) {
   162  	if b == nil {
   163  		b = make([]byte, m.Size())
   164  	}
   165  	buf := codec.NewBuffer(b)
   166  	buf.EncodeBool(m.IsAdd)
   167  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   168  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   169  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   170  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   171  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   172  	return buf.Bytes(), nil
   173  }
   174  func (m *IPNeighborAddDel) Unmarshal(b []byte) error {
   175  	buf := codec.NewBuffer(b)
   176  	m.IsAdd = buf.DecodeBool()
   177  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   178  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   179  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   180  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   181  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   182  	return nil
   183  }
   184  
   185  // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'.
   186  type IPNeighborAddDelReply struct {
   187  	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   188  	StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
   189  }
   190  
   191  func (m *IPNeighborAddDelReply) Reset()               { *m = IPNeighborAddDelReply{} }
   192  func (*IPNeighborAddDelReply) GetMessageName() string { return "ip_neighbor_add_del_reply" }
   193  func (*IPNeighborAddDelReply) GetCrcString() string   { return "1992deab" }
   194  func (*IPNeighborAddDelReply) GetMessageType() api.MessageType {
   195  	return api.ReplyMessage
   196  }
   197  
   198  func (m *IPNeighborAddDelReply) Size() (size int) {
   199  	if m == nil {
   200  		return 0
   201  	}
   202  	size += 4 // m.Retval
   203  	size += 4 // m.StatsIndex
   204  	return size
   205  }
   206  func (m *IPNeighborAddDelReply) Marshal(b []byte) ([]byte, error) {
   207  	if b == nil {
   208  		b = make([]byte, m.Size())
   209  	}
   210  	buf := codec.NewBuffer(b)
   211  	buf.EncodeInt32(m.Retval)
   212  	buf.EncodeUint32(m.StatsIndex)
   213  	return buf.Bytes(), nil
   214  }
   215  func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error {
   216  	buf := codec.NewBuffer(b)
   217  	m.Retval = buf.DecodeInt32()
   218  	m.StatsIndex = buf.DecodeUint32()
   219  	return nil
   220  }
   221  
   222  // IPNeighborConfig defines message 'ip_neighbor_config'.
   223  type IPNeighborConfig struct {
   224  	Af        ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
   225  	MaxNumber uint32                 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
   226  	MaxAge    uint32                 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
   227  	Recycle   bool                   `binapi:"bool,name=recycle" json:"recycle,omitempty"`
   228  }
   229  
   230  func (m *IPNeighborConfig) Reset()               { *m = IPNeighborConfig{} }
   231  func (*IPNeighborConfig) GetMessageName() string { return "ip_neighbor_config" }
   232  func (*IPNeighborConfig) GetCrcString() string   { return "f4a5cf44" }
   233  func (*IPNeighborConfig) GetMessageType() api.MessageType {
   234  	return api.RequestMessage
   235  }
   236  
   237  func (m *IPNeighborConfig) Size() (size int) {
   238  	if m == nil {
   239  		return 0
   240  	}
   241  	size += 1 // m.Af
   242  	size += 4 // m.MaxNumber
   243  	size += 4 // m.MaxAge
   244  	size += 1 // m.Recycle
   245  	return size
   246  }
   247  func (m *IPNeighborConfig) Marshal(b []byte) ([]byte, error) {
   248  	if b == nil {
   249  		b = make([]byte, m.Size())
   250  	}
   251  	buf := codec.NewBuffer(b)
   252  	buf.EncodeUint8(uint8(m.Af))
   253  	buf.EncodeUint32(m.MaxNumber)
   254  	buf.EncodeUint32(m.MaxAge)
   255  	buf.EncodeBool(m.Recycle)
   256  	return buf.Bytes(), nil
   257  }
   258  func (m *IPNeighborConfig) Unmarshal(b []byte) error {
   259  	buf := codec.NewBuffer(b)
   260  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   261  	m.MaxNumber = buf.DecodeUint32()
   262  	m.MaxAge = buf.DecodeUint32()
   263  	m.Recycle = buf.DecodeBool()
   264  	return nil
   265  }
   266  
   267  // IPNeighborConfigReply defines message 'ip_neighbor_config_reply'.
   268  type IPNeighborConfigReply struct {
   269  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   270  }
   271  
   272  func (m *IPNeighborConfigReply) Reset()               { *m = IPNeighborConfigReply{} }
   273  func (*IPNeighborConfigReply) GetMessageName() string { return "ip_neighbor_config_reply" }
   274  func (*IPNeighborConfigReply) GetCrcString() string   { return "e8d4e804" }
   275  func (*IPNeighborConfigReply) GetMessageType() api.MessageType {
   276  	return api.ReplyMessage
   277  }
   278  
   279  func (m *IPNeighborConfigReply) Size() (size int) {
   280  	if m == nil {
   281  		return 0
   282  	}
   283  	size += 4 // m.Retval
   284  	return size
   285  }
   286  func (m *IPNeighborConfigReply) Marshal(b []byte) ([]byte, error) {
   287  	if b == nil {
   288  		b = make([]byte, m.Size())
   289  	}
   290  	buf := codec.NewBuffer(b)
   291  	buf.EncodeInt32(m.Retval)
   292  	return buf.Bytes(), nil
   293  }
   294  func (m *IPNeighborConfigReply) Unmarshal(b []byte) error {
   295  	buf := codec.NewBuffer(b)
   296  	m.Retval = buf.DecodeInt32()
   297  	return nil
   298  }
   299  
   300  // IPNeighborDetails defines message 'ip_neighbor_details'.
   301  type IPNeighborDetails struct {
   302  	Age      float64    `binapi:"f64,name=age" json:"age,omitempty"`
   303  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   304  }
   305  
   306  func (m *IPNeighborDetails) Reset()               { *m = IPNeighborDetails{} }
   307  func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
   308  func (*IPNeighborDetails) GetCrcString() string   { return "870e80b9" }
   309  func (*IPNeighborDetails) GetMessageType() api.MessageType {
   310  	return api.ReplyMessage
   311  }
   312  
   313  func (m *IPNeighborDetails) Size() (size int) {
   314  	if m == nil {
   315  		return 0
   316  	}
   317  	size += 8      // m.Age
   318  	size += 4      // m.Neighbor.SwIfIndex
   319  	size += 1      // m.Neighbor.Flags
   320  	size += 1 * 6  // m.Neighbor.MacAddress
   321  	size += 1      // m.Neighbor.IPAddress.Af
   322  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   323  	return size
   324  }
   325  func (m *IPNeighborDetails) Marshal(b []byte) ([]byte, error) {
   326  	if b == nil {
   327  		b = make([]byte, m.Size())
   328  	}
   329  	buf := codec.NewBuffer(b)
   330  	buf.EncodeFloat64(m.Age)
   331  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   332  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   333  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   334  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   335  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   336  	return buf.Bytes(), nil
   337  }
   338  func (m *IPNeighborDetails) Unmarshal(b []byte) error {
   339  	buf := codec.NewBuffer(b)
   340  	m.Age = buf.DecodeFloat64()
   341  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   342  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   343  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   344  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   345  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   346  	return nil
   347  }
   348  
   349  // IPNeighborDump defines message 'ip_neighbor_dump'.
   350  type IPNeighborDump struct {
   351  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   352  	Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
   353  }
   354  
   355  func (m *IPNeighborDump) Reset()               { *m = IPNeighborDump{} }
   356  func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
   357  func (*IPNeighborDump) GetCrcString() string   { return "cd831298" }
   358  func (*IPNeighborDump) GetMessageType() api.MessageType {
   359  	return api.RequestMessage
   360  }
   361  
   362  func (m *IPNeighborDump) Size() (size int) {
   363  	if m == nil {
   364  		return 0
   365  	}
   366  	size += 4 // m.SwIfIndex
   367  	size += 1 // m.Af
   368  	return size
   369  }
   370  func (m *IPNeighborDump) Marshal(b []byte) ([]byte, error) {
   371  	if b == nil {
   372  		b = make([]byte, m.Size())
   373  	}
   374  	buf := codec.NewBuffer(b)
   375  	buf.EncodeUint32(uint32(m.SwIfIndex))
   376  	buf.EncodeUint8(uint8(m.Af))
   377  	return buf.Bytes(), nil
   378  }
   379  func (m *IPNeighborDump) Unmarshal(b []byte) error {
   380  	buf := codec.NewBuffer(b)
   381  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   382  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   383  	return nil
   384  }
   385  
   386  // IPNeighborEvent defines message 'ip_neighbor_event'.
   387  type IPNeighborEvent struct {
   388  	PID      uint32     `binapi:"u32,name=pid" json:"pid,omitempty"`
   389  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   390  }
   391  
   392  func (m *IPNeighborEvent) Reset()               { *m = IPNeighborEvent{} }
   393  func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
   394  func (*IPNeighborEvent) GetCrcString() string   { return "83933131" }
   395  func (*IPNeighborEvent) GetMessageType() api.MessageType {
   396  	return api.EventMessage
   397  }
   398  
   399  func (m *IPNeighborEvent) Size() (size int) {
   400  	if m == nil {
   401  		return 0
   402  	}
   403  	size += 4      // m.PID
   404  	size += 4      // m.Neighbor.SwIfIndex
   405  	size += 1      // m.Neighbor.Flags
   406  	size += 1 * 6  // m.Neighbor.MacAddress
   407  	size += 1      // m.Neighbor.IPAddress.Af
   408  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   409  	return size
   410  }
   411  func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
   412  	if b == nil {
   413  		b = make([]byte, m.Size())
   414  	}
   415  	buf := codec.NewBuffer(b)
   416  	buf.EncodeUint32(m.PID)
   417  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   418  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   419  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   420  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   421  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   422  	return buf.Bytes(), nil
   423  }
   424  func (m *IPNeighborEvent) Unmarshal(b []byte) error {
   425  	buf := codec.NewBuffer(b)
   426  	m.PID = buf.DecodeUint32()
   427  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   428  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   429  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   430  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   431  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   432  	return nil
   433  }
   434  
   435  // IPNeighborEventV2 defines message 'ip_neighbor_event_v2'.
   436  type IPNeighborEventV2 struct {
   437  	PID      uint32               `binapi:"u32,name=pid" json:"pid,omitempty"`
   438  	Flags    IPNeighborEventFlags `binapi:"ip_neighbor_event_flags,name=flags" json:"flags,omitempty"`
   439  	Neighbor IPNeighbor           `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   440  }
   441  
   442  func (m *IPNeighborEventV2) Reset()               { *m = IPNeighborEventV2{} }
   443  func (*IPNeighborEventV2) GetMessageName() string { return "ip_neighbor_event_v2" }
   444  func (*IPNeighborEventV2) GetCrcString() string   { return "c1d53dc0" }
   445  func (*IPNeighborEventV2) GetMessageType() api.MessageType {
   446  	return api.EventMessage
   447  }
   448  
   449  func (m *IPNeighborEventV2) Size() (size int) {
   450  	if m == nil {
   451  		return 0
   452  	}
   453  	size += 4      // m.PID
   454  	size += 4      // m.Flags
   455  	size += 4      // m.Neighbor.SwIfIndex
   456  	size += 1      // m.Neighbor.Flags
   457  	size += 1 * 6  // m.Neighbor.MacAddress
   458  	size += 1      // m.Neighbor.IPAddress.Af
   459  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   460  	return size
   461  }
   462  func (m *IPNeighborEventV2) Marshal(b []byte) ([]byte, error) {
   463  	if b == nil {
   464  		b = make([]byte, m.Size())
   465  	}
   466  	buf := codec.NewBuffer(b)
   467  	buf.EncodeUint32(m.PID)
   468  	buf.EncodeUint32(uint32(m.Flags))
   469  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   470  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   471  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   472  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   473  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   474  	return buf.Bytes(), nil
   475  }
   476  func (m *IPNeighborEventV2) Unmarshal(b []byte) error {
   477  	buf := codec.NewBuffer(b)
   478  	m.PID = buf.DecodeUint32()
   479  	m.Flags = IPNeighborEventFlags(buf.DecodeUint32())
   480  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   481  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   482  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   483  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   484  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   485  	return nil
   486  }
   487  
   488  // IPNeighborFlush defines message 'ip_neighbor_flush'.
   489  type IPNeighborFlush struct {
   490  	Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
   491  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   492  }
   493  
   494  func (m *IPNeighborFlush) Reset()               { *m = IPNeighborFlush{} }
   495  func (*IPNeighborFlush) GetMessageName() string { return "ip_neighbor_flush" }
   496  func (*IPNeighborFlush) GetCrcString() string   { return "16aa35d2" }
   497  func (*IPNeighborFlush) GetMessageType() api.MessageType {
   498  	return api.RequestMessage
   499  }
   500  
   501  func (m *IPNeighborFlush) Size() (size int) {
   502  	if m == nil {
   503  		return 0
   504  	}
   505  	size += 1 // m.Af
   506  	size += 4 // m.SwIfIndex
   507  	return size
   508  }
   509  func (m *IPNeighborFlush) Marshal(b []byte) ([]byte, error) {
   510  	if b == nil {
   511  		b = make([]byte, m.Size())
   512  	}
   513  	buf := codec.NewBuffer(b)
   514  	buf.EncodeUint8(uint8(m.Af))
   515  	buf.EncodeUint32(uint32(m.SwIfIndex))
   516  	return buf.Bytes(), nil
   517  }
   518  func (m *IPNeighborFlush) Unmarshal(b []byte) error {
   519  	buf := codec.NewBuffer(b)
   520  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   521  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   522  	return nil
   523  }
   524  
   525  // IPNeighborFlushReply defines message 'ip_neighbor_flush_reply'.
   526  type IPNeighborFlushReply struct {
   527  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   528  }
   529  
   530  func (m *IPNeighborFlushReply) Reset()               { *m = IPNeighborFlushReply{} }
   531  func (*IPNeighborFlushReply) GetMessageName() string { return "ip_neighbor_flush_reply" }
   532  func (*IPNeighborFlushReply) GetCrcString() string   { return "e8d4e804" }
   533  func (*IPNeighborFlushReply) GetMessageType() api.MessageType {
   534  	return api.ReplyMessage
   535  }
   536  
   537  func (m *IPNeighborFlushReply) Size() (size int) {
   538  	if m == nil {
   539  		return 0
   540  	}
   541  	size += 4 // m.Retval
   542  	return size
   543  }
   544  func (m *IPNeighborFlushReply) Marshal(b []byte) ([]byte, error) {
   545  	if b == nil {
   546  		b = make([]byte, m.Size())
   547  	}
   548  	buf := codec.NewBuffer(b)
   549  	buf.EncodeInt32(m.Retval)
   550  	return buf.Bytes(), nil
   551  }
   552  func (m *IPNeighborFlushReply) Unmarshal(b []byte) error {
   553  	buf := codec.NewBuffer(b)
   554  	m.Retval = buf.DecodeInt32()
   555  	return nil
   556  }
   557  
   558  // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'.
   559  type IPNeighborReplaceBegin struct{}
   560  
   561  func (m *IPNeighborReplaceBegin) Reset()               { *m = IPNeighborReplaceBegin{} }
   562  func (*IPNeighborReplaceBegin) GetMessageName() string { return "ip_neighbor_replace_begin" }
   563  func (*IPNeighborReplaceBegin) GetCrcString() string   { return "51077d14" }
   564  func (*IPNeighborReplaceBegin) GetMessageType() api.MessageType {
   565  	return api.RequestMessage
   566  }
   567  
   568  func (m *IPNeighborReplaceBegin) Size() (size int) {
   569  	if m == nil {
   570  		return 0
   571  	}
   572  	return size
   573  }
   574  func (m *IPNeighborReplaceBegin) Marshal(b []byte) ([]byte, error) {
   575  	if b == nil {
   576  		b = make([]byte, m.Size())
   577  	}
   578  	buf := codec.NewBuffer(b)
   579  	return buf.Bytes(), nil
   580  }
   581  func (m *IPNeighborReplaceBegin) Unmarshal(b []byte) error {
   582  	return nil
   583  }
   584  
   585  // IPNeighborReplaceBeginReply defines message 'ip_neighbor_replace_begin_reply'.
   586  type IPNeighborReplaceBeginReply struct {
   587  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   588  }
   589  
   590  func (m *IPNeighborReplaceBeginReply) Reset()               { *m = IPNeighborReplaceBeginReply{} }
   591  func (*IPNeighborReplaceBeginReply) GetMessageName() string { return "ip_neighbor_replace_begin_reply" }
   592  func (*IPNeighborReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
   593  func (*IPNeighborReplaceBeginReply) GetMessageType() api.MessageType {
   594  	return api.ReplyMessage
   595  }
   596  
   597  func (m *IPNeighborReplaceBeginReply) Size() (size int) {
   598  	if m == nil {
   599  		return 0
   600  	}
   601  	size += 4 // m.Retval
   602  	return size
   603  }
   604  func (m *IPNeighborReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
   605  	if b == nil {
   606  		b = make([]byte, m.Size())
   607  	}
   608  	buf := codec.NewBuffer(b)
   609  	buf.EncodeInt32(m.Retval)
   610  	return buf.Bytes(), nil
   611  }
   612  func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error {
   613  	buf := codec.NewBuffer(b)
   614  	m.Retval = buf.DecodeInt32()
   615  	return nil
   616  }
   617  
   618  // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'.
   619  type IPNeighborReplaceEnd struct{}
   620  
   621  func (m *IPNeighborReplaceEnd) Reset()               { *m = IPNeighborReplaceEnd{} }
   622  func (*IPNeighborReplaceEnd) GetMessageName() string { return "ip_neighbor_replace_end" }
   623  func (*IPNeighborReplaceEnd) GetCrcString() string   { return "51077d14" }
   624  func (*IPNeighborReplaceEnd) GetMessageType() api.MessageType {
   625  	return api.RequestMessage
   626  }
   627  
   628  func (m *IPNeighborReplaceEnd) Size() (size int) {
   629  	if m == nil {
   630  		return 0
   631  	}
   632  	return size
   633  }
   634  func (m *IPNeighborReplaceEnd) Marshal(b []byte) ([]byte, error) {
   635  	if b == nil {
   636  		b = make([]byte, m.Size())
   637  	}
   638  	buf := codec.NewBuffer(b)
   639  	return buf.Bytes(), nil
   640  }
   641  func (m *IPNeighborReplaceEnd) Unmarshal(b []byte) error {
   642  	return nil
   643  }
   644  
   645  // IPNeighborReplaceEndReply defines message 'ip_neighbor_replace_end_reply'.
   646  type IPNeighborReplaceEndReply struct {
   647  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   648  }
   649  
   650  func (m *IPNeighborReplaceEndReply) Reset()               { *m = IPNeighborReplaceEndReply{} }
   651  func (*IPNeighborReplaceEndReply) GetMessageName() string { return "ip_neighbor_replace_end_reply" }
   652  func (*IPNeighborReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
   653  func (*IPNeighborReplaceEndReply) GetMessageType() api.MessageType {
   654  	return api.ReplyMessage
   655  }
   656  
   657  func (m *IPNeighborReplaceEndReply) Size() (size int) {
   658  	if m == nil {
   659  		return 0
   660  	}
   661  	size += 4 // m.Retval
   662  	return size
   663  }
   664  func (m *IPNeighborReplaceEndReply) Marshal(b []byte) ([]byte, error) {
   665  	if b == nil {
   666  		b = make([]byte, m.Size())
   667  	}
   668  	buf := codec.NewBuffer(b)
   669  	buf.EncodeInt32(m.Retval)
   670  	return buf.Bytes(), nil
   671  }
   672  func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
   673  	buf := codec.NewBuffer(b)
   674  	m.Retval = buf.DecodeInt32()
   675  	return nil
   676  }
   677  
   678  // WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
   679  type WantIPNeighborEvents struct {
   680  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   681  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
   682  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
   683  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   684  }
   685  
   686  func (m *WantIPNeighborEvents) Reset()               { *m = WantIPNeighborEvents{} }
   687  func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
   688  func (*WantIPNeighborEvents) GetCrcString() string   { return "1a312870" }
   689  func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
   690  	return api.RequestMessage
   691  }
   692  
   693  func (m *WantIPNeighborEvents) Size() (size int) {
   694  	if m == nil {
   695  		return 0
   696  	}
   697  	size += 1      // m.Enable
   698  	size += 4      // m.PID
   699  	size += 1      // m.IP.Af
   700  	size += 1 * 16 // m.IP.Un
   701  	size += 4      // m.SwIfIndex
   702  	return size
   703  }
   704  func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
   705  	if b == nil {
   706  		b = make([]byte, m.Size())
   707  	}
   708  	buf := codec.NewBuffer(b)
   709  	buf.EncodeBool(m.Enable)
   710  	buf.EncodeUint32(m.PID)
   711  	buf.EncodeUint8(uint8(m.IP.Af))
   712  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
   713  	buf.EncodeUint32(uint32(m.SwIfIndex))
   714  	return buf.Bytes(), nil
   715  }
   716  func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
   717  	buf := codec.NewBuffer(b)
   718  	m.Enable = buf.DecodeBool()
   719  	m.PID = buf.DecodeUint32()
   720  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   721  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   722  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   723  	return nil
   724  }
   725  
   726  // WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
   727  type WantIPNeighborEventsReply struct {
   728  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   729  }
   730  
   731  func (m *WantIPNeighborEventsReply) Reset()               { *m = WantIPNeighborEventsReply{} }
   732  func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
   733  func (*WantIPNeighborEventsReply) GetCrcString() string   { return "e8d4e804" }
   734  func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
   735  	return api.ReplyMessage
   736  }
   737  
   738  func (m *WantIPNeighborEventsReply) Size() (size int) {
   739  	if m == nil {
   740  		return 0
   741  	}
   742  	size += 4 // m.Retval
   743  	return size
   744  }
   745  func (m *WantIPNeighborEventsReply) Marshal(b []byte) ([]byte, error) {
   746  	if b == nil {
   747  		b = make([]byte, m.Size())
   748  	}
   749  	buf := codec.NewBuffer(b)
   750  	buf.EncodeInt32(m.Retval)
   751  	return buf.Bytes(), nil
   752  }
   753  func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
   754  	buf := codec.NewBuffer(b)
   755  	m.Retval = buf.DecodeInt32()
   756  	return nil
   757  }
   758  
   759  // WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'.
   760  type WantIPNeighborEventsV2 struct {
   761  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   762  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
   763  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
   764  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   765  }
   766  
   767  func (m *WantIPNeighborEventsV2) Reset()               { *m = WantIPNeighborEventsV2{} }
   768  func (*WantIPNeighborEventsV2) GetMessageName() string { return "want_ip_neighbor_events_v2" }
   769  func (*WantIPNeighborEventsV2) GetCrcString() string   { return "73e70a86" }
   770  func (*WantIPNeighborEventsV2) GetMessageType() api.MessageType {
   771  	return api.RequestMessage
   772  }
   773  
   774  func (m *WantIPNeighborEventsV2) Size() (size int) {
   775  	if m == nil {
   776  		return 0
   777  	}
   778  	size += 1      // m.Enable
   779  	size += 4      // m.PID
   780  	size += 1      // m.IP.Af
   781  	size += 1 * 16 // m.IP.Un
   782  	size += 4      // m.SwIfIndex
   783  	return size
   784  }
   785  func (m *WantIPNeighborEventsV2) Marshal(b []byte) ([]byte, error) {
   786  	if b == nil {
   787  		b = make([]byte, m.Size())
   788  	}
   789  	buf := codec.NewBuffer(b)
   790  	buf.EncodeBool(m.Enable)
   791  	buf.EncodeUint32(m.PID)
   792  	buf.EncodeUint8(uint8(m.IP.Af))
   793  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
   794  	buf.EncodeUint32(uint32(m.SwIfIndex))
   795  	return buf.Bytes(), nil
   796  }
   797  func (m *WantIPNeighborEventsV2) Unmarshal(b []byte) error {
   798  	buf := codec.NewBuffer(b)
   799  	m.Enable = buf.DecodeBool()
   800  	m.PID = buf.DecodeUint32()
   801  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   802  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   803  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   804  	return nil
   805  }
   806  
   807  // WantIPNeighborEventsV2Reply defines message 'want_ip_neighbor_events_v2_reply'.
   808  type WantIPNeighborEventsV2Reply struct {
   809  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   810  }
   811  
   812  func (m *WantIPNeighborEventsV2Reply) Reset() { *m = WantIPNeighborEventsV2Reply{} }
   813  func (*WantIPNeighborEventsV2Reply) GetMessageName() string {
   814  	return "want_ip_neighbor_events_v2_reply"
   815  }
   816  func (*WantIPNeighborEventsV2Reply) GetCrcString() string { return "e8d4e804" }
   817  func (*WantIPNeighborEventsV2Reply) GetMessageType() api.MessageType {
   818  	return api.ReplyMessage
   819  }
   820  
   821  func (m *WantIPNeighborEventsV2Reply) Size() (size int) {
   822  	if m == nil {
   823  		return 0
   824  	}
   825  	size += 4 // m.Retval
   826  	return size
   827  }
   828  func (m *WantIPNeighborEventsV2Reply) Marshal(b []byte) ([]byte, error) {
   829  	if b == nil {
   830  		b = make([]byte, m.Size())
   831  	}
   832  	buf := codec.NewBuffer(b)
   833  	buf.EncodeInt32(m.Retval)
   834  	return buf.Bytes(), nil
   835  }
   836  func (m *WantIPNeighborEventsV2Reply) Unmarshal(b []byte) error {
   837  	buf := codec.NewBuffer(b)
   838  	m.Retval = buf.DecodeInt32()
   839  	return nil
   840  }
   841  
   842  func init() { file_ip_neighbor_binapi_init() }
   843  func file_ip_neighbor_binapi_init() {
   844  	api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_105518b6")
   845  	api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
   846  	api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
   847  	api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
   848  	api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_870e80b9")
   849  	api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_cd831298")
   850  	api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_83933131")
   851  	api.RegisterMessage((*IPNeighborEventV2)(nil), "ip_neighbor_event_v2_c1d53dc0")
   852  	api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
   853  	api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
   854  	api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
   855  	api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
   856  	api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
   857  	api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
   858  	api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_1a312870")
   859  	api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
   860  	api.RegisterMessage((*WantIPNeighborEventsV2)(nil), "want_ip_neighbor_events_v2_73e70a86")
   861  	api.RegisterMessage((*WantIPNeighborEventsV2Reply)(nil), "want_ip_neighbor_events_v2_reply_e8d4e804")
   862  }
   863  
   864  // Messages returns list of all messages in this module.
   865  func AllMessages() []api.Message {
   866  	return []api.Message{
   867  		(*IPNeighborAddDel)(nil),
   868  		(*IPNeighborAddDelReply)(nil),
   869  		(*IPNeighborConfig)(nil),
   870  		(*IPNeighborConfigReply)(nil),
   871  		(*IPNeighborDetails)(nil),
   872  		(*IPNeighborDump)(nil),
   873  		(*IPNeighborEvent)(nil),
   874  		(*IPNeighborEventV2)(nil),
   875  		(*IPNeighborFlush)(nil),
   876  		(*IPNeighborFlushReply)(nil),
   877  		(*IPNeighborReplaceBegin)(nil),
   878  		(*IPNeighborReplaceBeginReply)(nil),
   879  		(*IPNeighborReplaceEnd)(nil),
   880  		(*IPNeighborReplaceEndReply)(nil),
   881  		(*WantIPNeighborEvents)(nil),
   882  		(*WantIPNeighborEventsReply)(nil),
   883  		(*WantIPNeighborEventsV2)(nil),
   884  		(*WantIPNeighborEventsV2Reply)(nil),
   885  	}
   886  }