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

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package arp contains generated bindings for API file arp.api.
     4  //
     5  // Contents:
     6  // -  1 struct
     7  // -  8 messages
     8  package arp
     9  
    10  import (
    11  	api "go.fd.io/govpp/api"
    12  	codec "go.fd.io/govpp/codec"
    13  	_ "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2210/ethernet_types"
    14  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2210/interface_types"
    15  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2210/ip_types"
    16  )
    17  
    18  // This is a compile-time assertion to ensure that this generated file
    19  // is compatible with the GoVPP api package it is being compiled against.
    20  // A compilation error at this line likely means your copy of the
    21  // GoVPP api package needs to be updated.
    22  const _ = api.GoVppAPIPackageIsVersion2
    23  
    24  const (
    25  	APIFile    = "arp"
    26  	APIVersion = "1.0.0"
    27  	VersionCrc = 0xb57796ae
    28  )
    29  
    30  // ProxyArp defines type 'proxy_arp'.
    31  type ProxyArp struct {
    32  	TableID uint32              `binapi:"u32,name=table_id" json:"table_id,omitempty"`
    33  	Low     ip_types.IP4Address `binapi:"ip4_address,name=low" json:"low,omitempty"`
    34  	Hi      ip_types.IP4Address `binapi:"ip4_address,name=hi" json:"hi,omitempty"`
    35  }
    36  
    37  // ProxyArpAddDel defines message 'proxy_arp_add_del'.
    38  type ProxyArpAddDel struct {
    39  	IsAdd bool     `binapi:"bool,name=is_add" json:"is_add,omitempty"`
    40  	Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
    41  }
    42  
    43  func (m *ProxyArpAddDel) Reset()               { *m = ProxyArpAddDel{} }
    44  func (*ProxyArpAddDel) GetMessageName() string { return "proxy_arp_add_del" }
    45  func (*ProxyArpAddDel) GetCrcString() string   { return "1823c3e7" }
    46  func (*ProxyArpAddDel) GetMessageType() api.MessageType {
    47  	return api.RequestMessage
    48  }
    49  
    50  func (m *ProxyArpAddDel) Size() (size int) {
    51  	if m == nil {
    52  		return 0
    53  	}
    54  	size += 1     // m.IsAdd
    55  	size += 4     // m.Proxy.TableID
    56  	size += 1 * 4 // m.Proxy.Low
    57  	size += 1 * 4 // m.Proxy.Hi
    58  	return size
    59  }
    60  func (m *ProxyArpAddDel) Marshal(b []byte) ([]byte, error) {
    61  	if b == nil {
    62  		b = make([]byte, m.Size())
    63  	}
    64  	buf := codec.NewBuffer(b)
    65  	buf.EncodeBool(m.IsAdd)
    66  	buf.EncodeUint32(m.Proxy.TableID)
    67  	buf.EncodeBytes(m.Proxy.Low[:], 4)
    68  	buf.EncodeBytes(m.Proxy.Hi[:], 4)
    69  	return buf.Bytes(), nil
    70  }
    71  func (m *ProxyArpAddDel) Unmarshal(b []byte) error {
    72  	buf := codec.NewBuffer(b)
    73  	m.IsAdd = buf.DecodeBool()
    74  	m.Proxy.TableID = buf.DecodeUint32()
    75  	copy(m.Proxy.Low[:], buf.DecodeBytes(4))
    76  	copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
    77  	return nil
    78  }
    79  
    80  // ProxyArpAddDelReply defines message 'proxy_arp_add_del_reply'.
    81  type ProxyArpAddDelReply struct {
    82  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    83  }
    84  
    85  func (m *ProxyArpAddDelReply) Reset()               { *m = ProxyArpAddDelReply{} }
    86  func (*ProxyArpAddDelReply) GetMessageName() string { return "proxy_arp_add_del_reply" }
    87  func (*ProxyArpAddDelReply) GetCrcString() string   { return "e8d4e804" }
    88  func (*ProxyArpAddDelReply) GetMessageType() api.MessageType {
    89  	return api.ReplyMessage
    90  }
    91  
    92  func (m *ProxyArpAddDelReply) Size() (size int) {
    93  	if m == nil {
    94  		return 0
    95  	}
    96  	size += 4 // m.Retval
    97  	return size
    98  }
    99  func (m *ProxyArpAddDelReply) Marshal(b []byte) ([]byte, error) {
   100  	if b == nil {
   101  		b = make([]byte, m.Size())
   102  	}
   103  	buf := codec.NewBuffer(b)
   104  	buf.EncodeInt32(m.Retval)
   105  	return buf.Bytes(), nil
   106  }
   107  func (m *ProxyArpAddDelReply) Unmarshal(b []byte) error {
   108  	buf := codec.NewBuffer(b)
   109  	m.Retval = buf.DecodeInt32()
   110  	return nil
   111  }
   112  
   113  // ProxyArpDetails defines message 'proxy_arp_details'.
   114  type ProxyArpDetails struct {
   115  	Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
   116  }
   117  
   118  func (m *ProxyArpDetails) Reset()               { *m = ProxyArpDetails{} }
   119  func (*ProxyArpDetails) GetMessageName() string { return "proxy_arp_details" }
   120  func (*ProxyArpDetails) GetCrcString() string   { return "5b948673" }
   121  func (*ProxyArpDetails) GetMessageType() api.MessageType {
   122  	return api.ReplyMessage
   123  }
   124  
   125  func (m *ProxyArpDetails) Size() (size int) {
   126  	if m == nil {
   127  		return 0
   128  	}
   129  	size += 4     // m.Proxy.TableID
   130  	size += 1 * 4 // m.Proxy.Low
   131  	size += 1 * 4 // m.Proxy.Hi
   132  	return size
   133  }
   134  func (m *ProxyArpDetails) Marshal(b []byte) ([]byte, error) {
   135  	if b == nil {
   136  		b = make([]byte, m.Size())
   137  	}
   138  	buf := codec.NewBuffer(b)
   139  	buf.EncodeUint32(m.Proxy.TableID)
   140  	buf.EncodeBytes(m.Proxy.Low[:], 4)
   141  	buf.EncodeBytes(m.Proxy.Hi[:], 4)
   142  	return buf.Bytes(), nil
   143  }
   144  func (m *ProxyArpDetails) Unmarshal(b []byte) error {
   145  	buf := codec.NewBuffer(b)
   146  	m.Proxy.TableID = buf.DecodeUint32()
   147  	copy(m.Proxy.Low[:], buf.DecodeBytes(4))
   148  	copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
   149  	return nil
   150  }
   151  
   152  // ProxyArpDump defines message 'proxy_arp_dump'.
   153  type ProxyArpDump struct{}
   154  
   155  func (m *ProxyArpDump) Reset()               { *m = ProxyArpDump{} }
   156  func (*ProxyArpDump) GetMessageName() string { return "proxy_arp_dump" }
   157  func (*ProxyArpDump) GetCrcString() string   { return "51077d14" }
   158  func (*ProxyArpDump) GetMessageType() api.MessageType {
   159  	return api.RequestMessage
   160  }
   161  
   162  func (m *ProxyArpDump) Size() (size int) {
   163  	if m == nil {
   164  		return 0
   165  	}
   166  	return size
   167  }
   168  func (m *ProxyArpDump) Marshal(b []byte) ([]byte, error) {
   169  	if b == nil {
   170  		b = make([]byte, m.Size())
   171  	}
   172  	buf := codec.NewBuffer(b)
   173  	return buf.Bytes(), nil
   174  }
   175  func (m *ProxyArpDump) Unmarshal(b []byte) error {
   176  	return nil
   177  }
   178  
   179  // ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'.
   180  type ProxyArpIntfcDetails struct {
   181  	SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
   182  }
   183  
   184  func (m *ProxyArpIntfcDetails) Reset()               { *m = ProxyArpIntfcDetails{} }
   185  func (*ProxyArpIntfcDetails) GetMessageName() string { return "proxy_arp_intfc_details" }
   186  func (*ProxyArpIntfcDetails) GetCrcString() string   { return "f6458e5f" }
   187  func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType {
   188  	return api.ReplyMessage
   189  }
   190  
   191  func (m *ProxyArpIntfcDetails) Size() (size int) {
   192  	if m == nil {
   193  		return 0
   194  	}
   195  	size += 4 // m.SwIfIndex
   196  	return size
   197  }
   198  func (m *ProxyArpIntfcDetails) Marshal(b []byte) ([]byte, error) {
   199  	if b == nil {
   200  		b = make([]byte, m.Size())
   201  	}
   202  	buf := codec.NewBuffer(b)
   203  	buf.EncodeUint32(m.SwIfIndex)
   204  	return buf.Bytes(), nil
   205  }
   206  func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error {
   207  	buf := codec.NewBuffer(b)
   208  	m.SwIfIndex = buf.DecodeUint32()
   209  	return nil
   210  }
   211  
   212  // ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'.
   213  type ProxyArpIntfcDump struct{}
   214  
   215  func (m *ProxyArpIntfcDump) Reset()               { *m = ProxyArpIntfcDump{} }
   216  func (*ProxyArpIntfcDump) GetMessageName() string { return "proxy_arp_intfc_dump" }
   217  func (*ProxyArpIntfcDump) GetCrcString() string   { return "51077d14" }
   218  func (*ProxyArpIntfcDump) GetMessageType() api.MessageType {
   219  	return api.RequestMessage
   220  }
   221  
   222  func (m *ProxyArpIntfcDump) Size() (size int) {
   223  	if m == nil {
   224  		return 0
   225  	}
   226  	return size
   227  }
   228  func (m *ProxyArpIntfcDump) Marshal(b []byte) ([]byte, error) {
   229  	if b == nil {
   230  		b = make([]byte, m.Size())
   231  	}
   232  	buf := codec.NewBuffer(b)
   233  	return buf.Bytes(), nil
   234  }
   235  func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error {
   236  	return nil
   237  }
   238  
   239  // ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'.
   240  type ProxyArpIntfcEnableDisable struct {
   241  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   242  	Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
   243  }
   244  
   245  func (m *ProxyArpIntfcEnableDisable) Reset()               { *m = ProxyArpIntfcEnableDisable{} }
   246  func (*ProxyArpIntfcEnableDisable) GetMessageName() string { return "proxy_arp_intfc_enable_disable" }
   247  func (*ProxyArpIntfcEnableDisable) GetCrcString() string   { return "ae6cfcfb" }
   248  func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType {
   249  	return api.RequestMessage
   250  }
   251  
   252  func (m *ProxyArpIntfcEnableDisable) Size() (size int) {
   253  	if m == nil {
   254  		return 0
   255  	}
   256  	size += 4 // m.SwIfIndex
   257  	size += 1 // m.Enable
   258  	return size
   259  }
   260  func (m *ProxyArpIntfcEnableDisable) Marshal(b []byte) ([]byte, error) {
   261  	if b == nil {
   262  		b = make([]byte, m.Size())
   263  	}
   264  	buf := codec.NewBuffer(b)
   265  	buf.EncodeUint32(uint32(m.SwIfIndex))
   266  	buf.EncodeBool(m.Enable)
   267  	return buf.Bytes(), nil
   268  }
   269  func (m *ProxyArpIntfcEnableDisable) Unmarshal(b []byte) error {
   270  	buf := codec.NewBuffer(b)
   271  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   272  	m.Enable = buf.DecodeBool()
   273  	return nil
   274  }
   275  
   276  // ProxyArpIntfcEnableDisableReply defines message 'proxy_arp_intfc_enable_disable_reply'.
   277  type ProxyArpIntfcEnableDisableReply struct {
   278  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   279  }
   280  
   281  func (m *ProxyArpIntfcEnableDisableReply) Reset() { *m = ProxyArpIntfcEnableDisableReply{} }
   282  func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string {
   283  	return "proxy_arp_intfc_enable_disable_reply"
   284  }
   285  func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { return "e8d4e804" }
   286  func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType {
   287  	return api.ReplyMessage
   288  }
   289  
   290  func (m *ProxyArpIntfcEnableDisableReply) Size() (size int) {
   291  	if m == nil {
   292  		return 0
   293  	}
   294  	size += 4 // m.Retval
   295  	return size
   296  }
   297  func (m *ProxyArpIntfcEnableDisableReply) Marshal(b []byte) ([]byte, error) {
   298  	if b == nil {
   299  		b = make([]byte, m.Size())
   300  	}
   301  	buf := codec.NewBuffer(b)
   302  	buf.EncodeInt32(m.Retval)
   303  	return buf.Bytes(), nil
   304  }
   305  func (m *ProxyArpIntfcEnableDisableReply) Unmarshal(b []byte) error {
   306  	buf := codec.NewBuffer(b)
   307  	m.Retval = buf.DecodeInt32()
   308  	return nil
   309  }
   310  
   311  func init() { file_arp_binapi_init() }
   312  func file_arp_binapi_init() {
   313  	api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_1823c3e7")
   314  	api.RegisterMessage((*ProxyArpAddDelReply)(nil), "proxy_arp_add_del_reply_e8d4e804")
   315  	api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_5b948673")
   316  	api.RegisterMessage((*ProxyArpDump)(nil), "proxy_arp_dump_51077d14")
   317  	api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "proxy_arp_intfc_details_f6458e5f")
   318  	api.RegisterMessage((*ProxyArpIntfcDump)(nil), "proxy_arp_intfc_dump_51077d14")
   319  	api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "proxy_arp_intfc_enable_disable_ae6cfcfb")
   320  	api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "proxy_arp_intfc_enable_disable_reply_e8d4e804")
   321  }
   322  
   323  // Messages returns list of all messages in this module.
   324  func AllMessages() []api.Message {
   325  	return []api.Message{
   326  		(*ProxyArpAddDel)(nil),
   327  		(*ProxyArpAddDelReply)(nil),
   328  		(*ProxyArpDetails)(nil),
   329  		(*ProxyArpDump)(nil),
   330  		(*ProxyArpIntfcDetails)(nil),
   331  		(*ProxyArpIntfcDump)(nil),
   332  		(*ProxyArpIntfcEnableDisable)(nil),
   333  		(*ProxyArpIntfcEnableDisableReply)(nil),
   334  	}
   335  }