go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/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/vpp2106/ethernet_types"
    17  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types"
    18  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/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 = 0xfde4a69a
    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 "0607c257" }
   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 "e29d79f0" }
   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 "d817a484" }
   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  // Deprecated: the message will be removed in the future versions
   388  type IPNeighborEvent struct {
   389  	PID      uint32     `binapi:"u32,name=pid" json:"pid,omitempty"`
   390  	Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   391  }
   392  
   393  func (m *IPNeighborEvent) Reset()               { *m = IPNeighborEvent{} }
   394  func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
   395  func (*IPNeighborEvent) GetCrcString() string   { return "bdb092b2" }
   396  func (*IPNeighborEvent) GetMessageType() api.MessageType {
   397  	return api.EventMessage
   398  }
   399  
   400  func (m *IPNeighborEvent) Size() (size int) {
   401  	if m == nil {
   402  		return 0
   403  	}
   404  	size += 4      // m.PID
   405  	size += 4      // m.Neighbor.SwIfIndex
   406  	size += 1      // m.Neighbor.Flags
   407  	size += 1 * 6  // m.Neighbor.MacAddress
   408  	size += 1      // m.Neighbor.IPAddress.Af
   409  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   410  	return size
   411  }
   412  func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
   413  	if b == nil {
   414  		b = make([]byte, m.Size())
   415  	}
   416  	buf := codec.NewBuffer(b)
   417  	buf.EncodeUint32(m.PID)
   418  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   419  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   420  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   421  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   422  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   423  	return buf.Bytes(), nil
   424  }
   425  func (m *IPNeighborEvent) Unmarshal(b []byte) error {
   426  	buf := codec.NewBuffer(b)
   427  	m.PID = buf.DecodeUint32()
   428  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   429  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   430  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   431  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   432  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   433  	return nil
   434  }
   435  
   436  // IPNeighborEventV2 defines message 'ip_neighbor_event_v2'.
   437  type IPNeighborEventV2 struct {
   438  	PID      uint32               `binapi:"u32,name=pid" json:"pid,omitempty"`
   439  	Flags    IPNeighborEventFlags `binapi:"ip_neighbor_event_flags,name=flags" json:"flags,omitempty"`
   440  	Neighbor IPNeighbor           `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
   441  }
   442  
   443  func (m *IPNeighborEventV2) Reset()               { *m = IPNeighborEventV2{} }
   444  func (*IPNeighborEventV2) GetMessageName() string { return "ip_neighbor_event_v2" }
   445  func (*IPNeighborEventV2) GetCrcString() string   { return "c1d53dc0" }
   446  func (*IPNeighborEventV2) GetMessageType() api.MessageType {
   447  	return api.EventMessage
   448  }
   449  
   450  func (m *IPNeighborEventV2) Size() (size int) {
   451  	if m == nil {
   452  		return 0
   453  	}
   454  	size += 4      // m.PID
   455  	size += 4      // m.Flags
   456  	size += 4      // m.Neighbor.SwIfIndex
   457  	size += 1      // m.Neighbor.Flags
   458  	size += 1 * 6  // m.Neighbor.MacAddress
   459  	size += 1      // m.Neighbor.IPAddress.Af
   460  	size += 1 * 16 // m.Neighbor.IPAddress.Un
   461  	return size
   462  }
   463  func (m *IPNeighborEventV2) Marshal(b []byte) ([]byte, error) {
   464  	if b == nil {
   465  		b = make([]byte, m.Size())
   466  	}
   467  	buf := codec.NewBuffer(b)
   468  	buf.EncodeUint32(m.PID)
   469  	buf.EncodeUint32(uint32(m.Flags))
   470  	buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
   471  	buf.EncodeUint8(uint8(m.Neighbor.Flags))
   472  	buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
   473  	buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
   474  	buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
   475  	return buf.Bytes(), nil
   476  }
   477  func (m *IPNeighborEventV2) Unmarshal(b []byte) error {
   478  	buf := codec.NewBuffer(b)
   479  	m.PID = buf.DecodeUint32()
   480  	m.Flags = IPNeighborEventFlags(buf.DecodeUint32())
   481  	m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   482  	m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
   483  	copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
   484  	m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   485  	copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   486  	return nil
   487  }
   488  
   489  // IPNeighborFlush defines message 'ip_neighbor_flush'.
   490  type IPNeighborFlush struct {
   491  	Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
   492  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   493  }
   494  
   495  func (m *IPNeighborFlush) Reset()               { *m = IPNeighborFlush{} }
   496  func (*IPNeighborFlush) GetMessageName() string { return "ip_neighbor_flush" }
   497  func (*IPNeighborFlush) GetCrcString() string   { return "16aa35d2" }
   498  func (*IPNeighborFlush) GetMessageType() api.MessageType {
   499  	return api.RequestMessage
   500  }
   501  
   502  func (m *IPNeighborFlush) Size() (size int) {
   503  	if m == nil {
   504  		return 0
   505  	}
   506  	size += 1 // m.Af
   507  	size += 4 // m.SwIfIndex
   508  	return size
   509  }
   510  func (m *IPNeighborFlush) Marshal(b []byte) ([]byte, error) {
   511  	if b == nil {
   512  		b = make([]byte, m.Size())
   513  	}
   514  	buf := codec.NewBuffer(b)
   515  	buf.EncodeUint8(uint8(m.Af))
   516  	buf.EncodeUint32(uint32(m.SwIfIndex))
   517  	return buf.Bytes(), nil
   518  }
   519  func (m *IPNeighborFlush) Unmarshal(b []byte) error {
   520  	buf := codec.NewBuffer(b)
   521  	m.Af = ip_types.AddressFamily(buf.DecodeUint8())
   522  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   523  	return nil
   524  }
   525  
   526  // IPNeighborFlushReply defines message 'ip_neighbor_flush_reply'.
   527  type IPNeighborFlushReply struct {
   528  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   529  }
   530  
   531  func (m *IPNeighborFlushReply) Reset()               { *m = IPNeighborFlushReply{} }
   532  func (*IPNeighborFlushReply) GetMessageName() string { return "ip_neighbor_flush_reply" }
   533  func (*IPNeighborFlushReply) GetCrcString() string   { return "e8d4e804" }
   534  func (*IPNeighborFlushReply) GetMessageType() api.MessageType {
   535  	return api.ReplyMessage
   536  }
   537  
   538  func (m *IPNeighborFlushReply) Size() (size int) {
   539  	if m == nil {
   540  		return 0
   541  	}
   542  	size += 4 // m.Retval
   543  	return size
   544  }
   545  func (m *IPNeighborFlushReply) Marshal(b []byte) ([]byte, error) {
   546  	if b == nil {
   547  		b = make([]byte, m.Size())
   548  	}
   549  	buf := codec.NewBuffer(b)
   550  	buf.EncodeInt32(m.Retval)
   551  	return buf.Bytes(), nil
   552  }
   553  func (m *IPNeighborFlushReply) Unmarshal(b []byte) error {
   554  	buf := codec.NewBuffer(b)
   555  	m.Retval = buf.DecodeInt32()
   556  	return nil
   557  }
   558  
   559  // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'.
   560  type IPNeighborReplaceBegin struct{}
   561  
   562  func (m *IPNeighborReplaceBegin) Reset()               { *m = IPNeighborReplaceBegin{} }
   563  func (*IPNeighborReplaceBegin) GetMessageName() string { return "ip_neighbor_replace_begin" }
   564  func (*IPNeighborReplaceBegin) GetCrcString() string   { return "51077d14" }
   565  func (*IPNeighborReplaceBegin) GetMessageType() api.MessageType {
   566  	return api.RequestMessage
   567  }
   568  
   569  func (m *IPNeighborReplaceBegin) Size() (size int) {
   570  	if m == nil {
   571  		return 0
   572  	}
   573  	return size
   574  }
   575  func (m *IPNeighborReplaceBegin) Marshal(b []byte) ([]byte, error) {
   576  	if b == nil {
   577  		b = make([]byte, m.Size())
   578  	}
   579  	buf := codec.NewBuffer(b)
   580  	return buf.Bytes(), nil
   581  }
   582  func (m *IPNeighborReplaceBegin) Unmarshal(b []byte) error {
   583  	return nil
   584  }
   585  
   586  // IPNeighborReplaceBeginReply defines message 'ip_neighbor_replace_begin_reply'.
   587  type IPNeighborReplaceBeginReply struct {
   588  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   589  }
   590  
   591  func (m *IPNeighborReplaceBeginReply) Reset()               { *m = IPNeighborReplaceBeginReply{} }
   592  func (*IPNeighborReplaceBeginReply) GetMessageName() string { return "ip_neighbor_replace_begin_reply" }
   593  func (*IPNeighborReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
   594  func (*IPNeighborReplaceBeginReply) GetMessageType() api.MessageType {
   595  	return api.ReplyMessage
   596  }
   597  
   598  func (m *IPNeighborReplaceBeginReply) Size() (size int) {
   599  	if m == nil {
   600  		return 0
   601  	}
   602  	size += 4 // m.Retval
   603  	return size
   604  }
   605  func (m *IPNeighborReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
   606  	if b == nil {
   607  		b = make([]byte, m.Size())
   608  	}
   609  	buf := codec.NewBuffer(b)
   610  	buf.EncodeInt32(m.Retval)
   611  	return buf.Bytes(), nil
   612  }
   613  func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error {
   614  	buf := codec.NewBuffer(b)
   615  	m.Retval = buf.DecodeInt32()
   616  	return nil
   617  }
   618  
   619  // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'.
   620  type IPNeighborReplaceEnd struct{}
   621  
   622  func (m *IPNeighborReplaceEnd) Reset()               { *m = IPNeighborReplaceEnd{} }
   623  func (*IPNeighborReplaceEnd) GetMessageName() string { return "ip_neighbor_replace_end" }
   624  func (*IPNeighborReplaceEnd) GetCrcString() string   { return "51077d14" }
   625  func (*IPNeighborReplaceEnd) GetMessageType() api.MessageType {
   626  	return api.RequestMessage
   627  }
   628  
   629  func (m *IPNeighborReplaceEnd) Size() (size int) {
   630  	if m == nil {
   631  		return 0
   632  	}
   633  	return size
   634  }
   635  func (m *IPNeighborReplaceEnd) Marshal(b []byte) ([]byte, error) {
   636  	if b == nil {
   637  		b = make([]byte, m.Size())
   638  	}
   639  	buf := codec.NewBuffer(b)
   640  	return buf.Bytes(), nil
   641  }
   642  func (m *IPNeighborReplaceEnd) Unmarshal(b []byte) error {
   643  	return nil
   644  }
   645  
   646  // IPNeighborReplaceEndReply defines message 'ip_neighbor_replace_end_reply'.
   647  type IPNeighborReplaceEndReply struct {
   648  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   649  }
   650  
   651  func (m *IPNeighborReplaceEndReply) Reset()               { *m = IPNeighborReplaceEndReply{} }
   652  func (*IPNeighborReplaceEndReply) GetMessageName() string { return "ip_neighbor_replace_end_reply" }
   653  func (*IPNeighborReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
   654  func (*IPNeighborReplaceEndReply) GetMessageType() api.MessageType {
   655  	return api.ReplyMessage
   656  }
   657  
   658  func (m *IPNeighborReplaceEndReply) Size() (size int) {
   659  	if m == nil {
   660  		return 0
   661  	}
   662  	size += 4 // m.Retval
   663  	return size
   664  }
   665  func (m *IPNeighborReplaceEndReply) Marshal(b []byte) ([]byte, error) {
   666  	if b == nil {
   667  		b = make([]byte, m.Size())
   668  	}
   669  	buf := codec.NewBuffer(b)
   670  	buf.EncodeInt32(m.Retval)
   671  	return buf.Bytes(), nil
   672  }
   673  func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
   674  	buf := codec.NewBuffer(b)
   675  	m.Retval = buf.DecodeInt32()
   676  	return nil
   677  }
   678  
   679  // WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
   680  // Deprecated: the message will be removed in the future versions
   681  type WantIPNeighborEvents struct {
   682  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   683  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
   684  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
   685  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   686  }
   687  
   688  func (m *WantIPNeighborEvents) Reset()               { *m = WantIPNeighborEvents{} }
   689  func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
   690  func (*WantIPNeighborEvents) GetCrcString() string   { return "73e70a86" }
   691  func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
   692  	return api.RequestMessage
   693  }
   694  
   695  func (m *WantIPNeighborEvents) Size() (size int) {
   696  	if m == nil {
   697  		return 0
   698  	}
   699  	size += 1      // m.Enable
   700  	size += 4      // m.PID
   701  	size += 1      // m.IP.Af
   702  	size += 1 * 16 // m.IP.Un
   703  	size += 4      // m.SwIfIndex
   704  	return size
   705  }
   706  func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
   707  	if b == nil {
   708  		b = make([]byte, m.Size())
   709  	}
   710  	buf := codec.NewBuffer(b)
   711  	buf.EncodeBool(m.Enable)
   712  	buf.EncodeUint32(m.PID)
   713  	buf.EncodeUint8(uint8(m.IP.Af))
   714  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
   715  	buf.EncodeUint32(uint32(m.SwIfIndex))
   716  	return buf.Bytes(), nil
   717  }
   718  func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
   719  	buf := codec.NewBuffer(b)
   720  	m.Enable = buf.DecodeBool()
   721  	m.PID = buf.DecodeUint32()
   722  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   723  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   724  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   725  	return nil
   726  }
   727  
   728  // WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
   729  // Deprecated: the message will be removed in the future versions
   730  type WantIPNeighborEventsReply struct {
   731  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   732  }
   733  
   734  func (m *WantIPNeighborEventsReply) Reset()               { *m = WantIPNeighborEventsReply{} }
   735  func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
   736  func (*WantIPNeighborEventsReply) GetCrcString() string   { return "e8d4e804" }
   737  func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
   738  	return api.ReplyMessage
   739  }
   740  
   741  func (m *WantIPNeighborEventsReply) Size() (size int) {
   742  	if m == nil {
   743  		return 0
   744  	}
   745  	size += 4 // m.Retval
   746  	return size
   747  }
   748  func (m *WantIPNeighborEventsReply) Marshal(b []byte) ([]byte, error) {
   749  	if b == nil {
   750  		b = make([]byte, m.Size())
   751  	}
   752  	buf := codec.NewBuffer(b)
   753  	buf.EncodeInt32(m.Retval)
   754  	return buf.Bytes(), nil
   755  }
   756  func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
   757  	buf := codec.NewBuffer(b)
   758  	m.Retval = buf.DecodeInt32()
   759  	return nil
   760  }
   761  
   762  // WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'.
   763  type WantIPNeighborEventsV2 struct {
   764  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   765  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
   766  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
   767  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   768  }
   769  
   770  func (m *WantIPNeighborEventsV2) Reset()               { *m = WantIPNeighborEventsV2{} }
   771  func (*WantIPNeighborEventsV2) GetMessageName() string { return "want_ip_neighbor_events_v2" }
   772  func (*WantIPNeighborEventsV2) GetCrcString() string   { return "73e70a86" }
   773  func (*WantIPNeighborEventsV2) GetMessageType() api.MessageType {
   774  	return api.RequestMessage
   775  }
   776  
   777  func (m *WantIPNeighborEventsV2) Size() (size int) {
   778  	if m == nil {
   779  		return 0
   780  	}
   781  	size += 1      // m.Enable
   782  	size += 4      // m.PID
   783  	size += 1      // m.IP.Af
   784  	size += 1 * 16 // m.IP.Un
   785  	size += 4      // m.SwIfIndex
   786  	return size
   787  }
   788  func (m *WantIPNeighborEventsV2) Marshal(b []byte) ([]byte, error) {
   789  	if b == nil {
   790  		b = make([]byte, m.Size())
   791  	}
   792  	buf := codec.NewBuffer(b)
   793  	buf.EncodeBool(m.Enable)
   794  	buf.EncodeUint32(m.PID)
   795  	buf.EncodeUint8(uint8(m.IP.Af))
   796  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
   797  	buf.EncodeUint32(uint32(m.SwIfIndex))
   798  	return buf.Bytes(), nil
   799  }
   800  func (m *WantIPNeighborEventsV2) Unmarshal(b []byte) error {
   801  	buf := codec.NewBuffer(b)
   802  	m.Enable = buf.DecodeBool()
   803  	m.PID = buf.DecodeUint32()
   804  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   805  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   806  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   807  	return nil
   808  }
   809  
   810  // WantIPNeighborEventsV2Reply defines message 'want_ip_neighbor_events_v2_reply'.
   811  type WantIPNeighborEventsV2Reply struct {
   812  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   813  }
   814  
   815  func (m *WantIPNeighborEventsV2Reply) Reset() { *m = WantIPNeighborEventsV2Reply{} }
   816  func (*WantIPNeighborEventsV2Reply) GetMessageName() string {
   817  	return "want_ip_neighbor_events_v2_reply"
   818  }
   819  func (*WantIPNeighborEventsV2Reply) GetCrcString() string { return "e8d4e804" }
   820  func (*WantIPNeighborEventsV2Reply) GetMessageType() api.MessageType {
   821  	return api.ReplyMessage
   822  }
   823  
   824  func (m *WantIPNeighborEventsV2Reply) Size() (size int) {
   825  	if m == nil {
   826  		return 0
   827  	}
   828  	size += 4 // m.Retval
   829  	return size
   830  }
   831  func (m *WantIPNeighborEventsV2Reply) Marshal(b []byte) ([]byte, error) {
   832  	if b == nil {
   833  		b = make([]byte, m.Size())
   834  	}
   835  	buf := codec.NewBuffer(b)
   836  	buf.EncodeInt32(m.Retval)
   837  	return buf.Bytes(), nil
   838  }
   839  func (m *WantIPNeighborEventsV2Reply) Unmarshal(b []byte) error {
   840  	buf := codec.NewBuffer(b)
   841  	m.Retval = buf.DecodeInt32()
   842  	return nil
   843  }
   844  
   845  func init() { file_ip_neighbor_binapi_init() }
   846  func file_ip_neighbor_binapi_init() {
   847  	api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_0607c257")
   848  	api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
   849  	api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
   850  	api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
   851  	api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_e29d79f0")
   852  	api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_d817a484")
   853  	api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_bdb092b2")
   854  	api.RegisterMessage((*IPNeighborEventV2)(nil), "ip_neighbor_event_v2_c1d53dc0")
   855  	api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
   856  	api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
   857  	api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
   858  	api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
   859  	api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
   860  	api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
   861  	api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_73e70a86")
   862  	api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
   863  	api.RegisterMessage((*WantIPNeighborEventsV2)(nil), "want_ip_neighbor_events_v2_73e70a86")
   864  	api.RegisterMessage((*WantIPNeighborEventsV2Reply)(nil), "want_ip_neighbor_events_v2_reply_e8d4e804")
   865  }
   866  
   867  // Messages returns list of all messages in this module.
   868  func AllMessages() []api.Message {
   869  	return []api.Message{
   870  		(*IPNeighborAddDel)(nil),
   871  		(*IPNeighborAddDelReply)(nil),
   872  		(*IPNeighborConfig)(nil),
   873  		(*IPNeighborConfigReply)(nil),
   874  		(*IPNeighborDetails)(nil),
   875  		(*IPNeighborDump)(nil),
   876  		(*IPNeighborEvent)(nil),
   877  		(*IPNeighborEventV2)(nil),
   878  		(*IPNeighborFlush)(nil),
   879  		(*IPNeighborFlushReply)(nil),
   880  		(*IPNeighborReplaceBegin)(nil),
   881  		(*IPNeighborReplaceBeginReply)(nil),
   882  		(*IPNeighborReplaceEnd)(nil),
   883  		(*IPNeighborReplaceEndReply)(nil),
   884  		(*WantIPNeighborEvents)(nil),
   885  		(*WantIPNeighborEventsReply)(nil),
   886  		(*WantIPNeighborEventsV2)(nil),
   887  		(*WantIPNeighborEventsV2Reply)(nil),
   888  	}
   889  }