1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.6.0-dev
5 // source: /usr/share/vpp/api/core/arp.api.json
7 // Package arp contains generated bindings for API file arp.api.
16 api "go.fd.io/govpp/api"
17 _ "go.fd.io/govpp/binapi/ethernet_types"
18 interface_types "go.fd.io/govpp/binapi/interface_types"
19 ip_types "go.fd.io/govpp/binapi/ip_types"
20 codec "go.fd.io/govpp/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0xb57796ae
35 // ProxyArp defines type 'proxy_arp'.
36 type ProxyArp struct {
37 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
38 Low ip_types.IP4Address `binapi:"ip4_address,name=low" json:"low,omitempty"`
39 Hi ip_types.IP4Address `binapi:"ip4_address,name=hi" json:"hi,omitempty"`
42 // ProxyArpAddDel defines message 'proxy_arp_add_del'.
43 type ProxyArpAddDel struct {
44 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
45 Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
48 func (m *ProxyArpAddDel) Reset() { *m = ProxyArpAddDel{} }
49 func (*ProxyArpAddDel) GetMessageName() string { return "proxy_arp_add_del" }
50 func (*ProxyArpAddDel) GetCrcString() string { return "1823c3e7" }
51 func (*ProxyArpAddDel) GetMessageType() api.MessageType {
52 return api.RequestMessage
55 func (m *ProxyArpAddDel) Size() (size int) {
60 size += 4 // m.Proxy.TableID
61 size += 1 * 4 // m.Proxy.Low
62 size += 1 * 4 // m.Proxy.Hi
65 func (m *ProxyArpAddDel) Marshal(b []byte) ([]byte, error) {
67 b = make([]byte, m.Size())
69 buf := codec.NewBuffer(b)
70 buf.EncodeBool(m.IsAdd)
71 buf.EncodeUint32(m.Proxy.TableID)
72 buf.EncodeBytes(m.Proxy.Low[:], 4)
73 buf.EncodeBytes(m.Proxy.Hi[:], 4)
74 return buf.Bytes(), nil
76 func (m *ProxyArpAddDel) Unmarshal(b []byte) error {
77 buf := codec.NewBuffer(b)
78 m.IsAdd = buf.DecodeBool()
79 m.Proxy.TableID = buf.DecodeUint32()
80 copy(m.Proxy.Low[:], buf.DecodeBytes(4))
81 copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
85 // ProxyArpAddDelReply defines message 'proxy_arp_add_del_reply'.
86 type ProxyArpAddDelReply struct {
87 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
90 func (m *ProxyArpAddDelReply) Reset() { *m = ProxyArpAddDelReply{} }
91 func (*ProxyArpAddDelReply) GetMessageName() string { return "proxy_arp_add_del_reply" }
92 func (*ProxyArpAddDelReply) GetCrcString() string { return "e8d4e804" }
93 func (*ProxyArpAddDelReply) GetMessageType() api.MessageType {
94 return api.ReplyMessage
97 func (m *ProxyArpAddDelReply) Size() (size int) {
101 size += 4 // m.Retval
104 func (m *ProxyArpAddDelReply) Marshal(b []byte) ([]byte, error) {
106 b = make([]byte, m.Size())
108 buf := codec.NewBuffer(b)
109 buf.EncodeInt32(m.Retval)
110 return buf.Bytes(), nil
112 func (m *ProxyArpAddDelReply) Unmarshal(b []byte) error {
113 buf := codec.NewBuffer(b)
114 m.Retval = buf.DecodeInt32()
118 // ProxyArpDetails defines message 'proxy_arp_details'.
119 type ProxyArpDetails struct {
120 Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
123 func (m *ProxyArpDetails) Reset() { *m = ProxyArpDetails{} }
124 func (*ProxyArpDetails) GetMessageName() string { return "proxy_arp_details" }
125 func (*ProxyArpDetails) GetCrcString() string { return "5b948673" }
126 func (*ProxyArpDetails) GetMessageType() api.MessageType {
127 return api.ReplyMessage
130 func (m *ProxyArpDetails) Size() (size int) {
134 size += 4 // m.Proxy.TableID
135 size += 1 * 4 // m.Proxy.Low
136 size += 1 * 4 // m.Proxy.Hi
139 func (m *ProxyArpDetails) Marshal(b []byte) ([]byte, error) {
141 b = make([]byte, m.Size())
143 buf := codec.NewBuffer(b)
144 buf.EncodeUint32(m.Proxy.TableID)
145 buf.EncodeBytes(m.Proxy.Low[:], 4)
146 buf.EncodeBytes(m.Proxy.Hi[:], 4)
147 return buf.Bytes(), nil
149 func (m *ProxyArpDetails) Unmarshal(b []byte) error {
150 buf := codec.NewBuffer(b)
151 m.Proxy.TableID = buf.DecodeUint32()
152 copy(m.Proxy.Low[:], buf.DecodeBytes(4))
153 copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
157 // ProxyArpDump defines message 'proxy_arp_dump'.
158 type ProxyArpDump struct{}
160 func (m *ProxyArpDump) Reset() { *m = ProxyArpDump{} }
161 func (*ProxyArpDump) GetMessageName() string { return "proxy_arp_dump" }
162 func (*ProxyArpDump) GetCrcString() string { return "51077d14" }
163 func (*ProxyArpDump) GetMessageType() api.MessageType {
164 return api.RequestMessage
167 func (m *ProxyArpDump) Size() (size int) {
173 func (m *ProxyArpDump) Marshal(b []byte) ([]byte, error) {
175 b = make([]byte, m.Size())
177 buf := codec.NewBuffer(b)
178 return buf.Bytes(), nil
180 func (m *ProxyArpDump) Unmarshal(b []byte) error {
184 // ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'.
185 type ProxyArpIntfcDetails struct {
186 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
189 func (m *ProxyArpIntfcDetails) Reset() { *m = ProxyArpIntfcDetails{} }
190 func (*ProxyArpIntfcDetails) GetMessageName() string { return "proxy_arp_intfc_details" }
191 func (*ProxyArpIntfcDetails) GetCrcString() string { return "f6458e5f" }
192 func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType {
193 return api.ReplyMessage
196 func (m *ProxyArpIntfcDetails) Size() (size int) {
200 size += 4 // m.SwIfIndex
203 func (m *ProxyArpIntfcDetails) Marshal(b []byte) ([]byte, error) {
205 b = make([]byte, m.Size())
207 buf := codec.NewBuffer(b)
208 buf.EncodeUint32(m.SwIfIndex)
209 return buf.Bytes(), nil
211 func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error {
212 buf := codec.NewBuffer(b)
213 m.SwIfIndex = buf.DecodeUint32()
217 // ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'.
218 type ProxyArpIntfcDump struct{}
220 func (m *ProxyArpIntfcDump) Reset() { *m = ProxyArpIntfcDump{} }
221 func (*ProxyArpIntfcDump) GetMessageName() string { return "proxy_arp_intfc_dump" }
222 func (*ProxyArpIntfcDump) GetCrcString() string { return "51077d14" }
223 func (*ProxyArpIntfcDump) GetMessageType() api.MessageType {
224 return api.RequestMessage
227 func (m *ProxyArpIntfcDump) Size() (size int) {
233 func (m *ProxyArpIntfcDump) Marshal(b []byte) ([]byte, error) {
235 b = make([]byte, m.Size())
237 buf := codec.NewBuffer(b)
238 return buf.Bytes(), nil
240 func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error {
244 // ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'.
245 type ProxyArpIntfcEnableDisable struct {
246 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
247 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
250 func (m *ProxyArpIntfcEnableDisable) Reset() { *m = ProxyArpIntfcEnableDisable{} }
251 func (*ProxyArpIntfcEnableDisable) GetMessageName() string { return "proxy_arp_intfc_enable_disable" }
252 func (*ProxyArpIntfcEnableDisable) GetCrcString() string { return "ae6cfcfb" }
253 func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType {
254 return api.RequestMessage
257 func (m *ProxyArpIntfcEnableDisable) Size() (size int) {
261 size += 4 // m.SwIfIndex
262 size += 1 // m.Enable
265 func (m *ProxyArpIntfcEnableDisable) Marshal(b []byte) ([]byte, error) {
267 b = make([]byte, m.Size())
269 buf := codec.NewBuffer(b)
270 buf.EncodeUint32(uint32(m.SwIfIndex))
271 buf.EncodeBool(m.Enable)
272 return buf.Bytes(), nil
274 func (m *ProxyArpIntfcEnableDisable) Unmarshal(b []byte) error {
275 buf := codec.NewBuffer(b)
276 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
277 m.Enable = buf.DecodeBool()
281 // ProxyArpIntfcEnableDisableReply defines message 'proxy_arp_intfc_enable_disable_reply'.
282 type ProxyArpIntfcEnableDisableReply struct {
283 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
286 func (m *ProxyArpIntfcEnableDisableReply) Reset() { *m = ProxyArpIntfcEnableDisableReply{} }
287 func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string {
288 return "proxy_arp_intfc_enable_disable_reply"
290 func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { return "e8d4e804" }
291 func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType {
292 return api.ReplyMessage
295 func (m *ProxyArpIntfcEnableDisableReply) Size() (size int) {
299 size += 4 // m.Retval
302 func (m *ProxyArpIntfcEnableDisableReply) Marshal(b []byte) ([]byte, error) {
304 b = make([]byte, m.Size())
306 buf := codec.NewBuffer(b)
307 buf.EncodeInt32(m.Retval)
308 return buf.Bytes(), nil
310 func (m *ProxyArpIntfcEnableDisableReply) Unmarshal(b []byte) error {
311 buf := codec.NewBuffer(b)
312 m.Retval = buf.DecodeInt32()
316 func init() { file_arp_binapi_init() }
317 func file_arp_binapi_init() {
318 api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_1823c3e7")
319 api.RegisterMessage((*ProxyArpAddDelReply)(nil), "proxy_arp_add_del_reply_e8d4e804")
320 api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_5b948673")
321 api.RegisterMessage((*ProxyArpDump)(nil), "proxy_arp_dump_51077d14")
322 api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "proxy_arp_intfc_details_f6458e5f")
323 api.RegisterMessage((*ProxyArpIntfcDump)(nil), "proxy_arp_intfc_dump_51077d14")
324 api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "proxy_arp_intfc_enable_disable_ae6cfcfb")
325 api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "proxy_arp_intfc_enable_disable_reply_e8d4e804")
328 // Messages returns list of all messages in this module.
329 func AllMessages() []api.Message {
330 return []api.Message{
331 (*ProxyArpAddDel)(nil),
332 (*ProxyArpAddDelReply)(nil),
333 (*ProxyArpDetails)(nil),
334 (*ProxyArpDump)(nil),
335 (*ProxyArpIntfcDetails)(nil),
336 (*ProxyArpIntfcDump)(nil),
337 (*ProxyArpIntfcEnableDisable)(nil),
338 (*ProxyArpIntfcEnableDisableReply)(nil),