1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.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 "git.fd.io/govpp.git/api"
17 _ "git.fd.io/govpp.git/binapi/ethernet_types"
18 interface_types "git.fd.io/govpp.git/binapi/interface_types"
19 ip_types "git.fd.io/govpp.git/binapi/ip_types"
20 codec "git.fd.io/govpp.git/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 = 0x79ca86f2
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 "85486cbd" }
51 func (*ProxyArpAddDel) GetMessageType() api.MessageType {
52 return api.RequestMessage
55 func (m *ProxyArpAddDel) Size() int {
61 size += 4 // m.Proxy.TableID
62 size += 1 * 4 // m.Proxy.Low
63 size += 1 * 4 // m.Proxy.Hi
66 func (m *ProxyArpAddDel) Marshal(b []byte) ([]byte, error) {
69 buf = codec.NewBuffer(make([]byte, m.Size()))
71 buf = codec.NewBuffer(b)
73 buf.EncodeBool(m.IsAdd)
74 buf.EncodeUint32(uint32(m.Proxy.TableID))
75 buf.EncodeBytes(m.Proxy.Low[:], 4)
76 buf.EncodeBytes(m.Proxy.Hi[:], 4)
77 return buf.Bytes(), nil
79 func (m *ProxyArpAddDel) Unmarshal(b []byte) error {
80 buf := codec.NewBuffer(b)
81 m.IsAdd = buf.DecodeBool()
82 m.Proxy.TableID = buf.DecodeUint32()
83 copy(m.Proxy.Low[:], buf.DecodeBytes(4))
84 copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
88 // ProxyArpAddDelReply defines message 'proxy_arp_add_del_reply'.
89 type ProxyArpAddDelReply struct {
90 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
93 func (m *ProxyArpAddDelReply) Reset() { *m = ProxyArpAddDelReply{} }
94 func (*ProxyArpAddDelReply) GetMessageName() string { return "proxy_arp_add_del_reply" }
95 func (*ProxyArpAddDelReply) GetCrcString() string { return "e8d4e804" }
96 func (*ProxyArpAddDelReply) GetMessageType() api.MessageType {
97 return api.ReplyMessage
100 func (m *ProxyArpAddDelReply) Size() int {
105 size += 4 // m.Retval
108 func (m *ProxyArpAddDelReply) Marshal(b []byte) ([]byte, error) {
109 var buf *codec.Buffer
111 buf = codec.NewBuffer(make([]byte, m.Size()))
113 buf = codec.NewBuffer(b)
115 buf.EncodeUint32(uint32(m.Retval))
116 return buf.Bytes(), nil
118 func (m *ProxyArpAddDelReply) Unmarshal(b []byte) error {
119 buf := codec.NewBuffer(b)
120 m.Retval = int32(buf.DecodeUint32())
124 // ProxyArpDetails defines message 'proxy_arp_details'.
125 type ProxyArpDetails struct {
126 Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
129 func (m *ProxyArpDetails) Reset() { *m = ProxyArpDetails{} }
130 func (*ProxyArpDetails) GetMessageName() string { return "proxy_arp_details" }
131 func (*ProxyArpDetails) GetCrcString() string { return "9228c150" }
132 func (*ProxyArpDetails) GetMessageType() api.MessageType {
133 return api.ReplyMessage
136 func (m *ProxyArpDetails) Size() int {
141 size += 4 // m.Proxy.TableID
142 size += 1 * 4 // m.Proxy.Low
143 size += 1 * 4 // m.Proxy.Hi
146 func (m *ProxyArpDetails) Marshal(b []byte) ([]byte, error) {
147 var buf *codec.Buffer
149 buf = codec.NewBuffer(make([]byte, m.Size()))
151 buf = codec.NewBuffer(b)
153 buf.EncodeUint32(uint32(m.Proxy.TableID))
154 buf.EncodeBytes(m.Proxy.Low[:], 4)
155 buf.EncodeBytes(m.Proxy.Hi[:], 4)
156 return buf.Bytes(), nil
158 func (m *ProxyArpDetails) Unmarshal(b []byte) error {
159 buf := codec.NewBuffer(b)
160 m.Proxy.TableID = buf.DecodeUint32()
161 copy(m.Proxy.Low[:], buf.DecodeBytes(4))
162 copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
166 // ProxyArpDump defines message 'proxy_arp_dump'.
167 type ProxyArpDump struct{}
169 func (m *ProxyArpDump) Reset() { *m = ProxyArpDump{} }
170 func (*ProxyArpDump) GetMessageName() string { return "proxy_arp_dump" }
171 func (*ProxyArpDump) GetCrcString() string { return "51077d14" }
172 func (*ProxyArpDump) GetMessageType() api.MessageType {
173 return api.RequestMessage
176 func (m *ProxyArpDump) Size() int {
183 func (m *ProxyArpDump) Marshal(b []byte) ([]byte, error) {
184 var buf *codec.Buffer
186 buf = codec.NewBuffer(make([]byte, m.Size()))
188 buf = codec.NewBuffer(b)
190 return buf.Bytes(), nil
192 func (m *ProxyArpDump) Unmarshal(b []byte) error {
196 // ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'.
197 type ProxyArpIntfcDetails struct {
198 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
201 func (m *ProxyArpIntfcDetails) Reset() { *m = ProxyArpIntfcDetails{} }
202 func (*ProxyArpIntfcDetails) GetMessageName() string { return "proxy_arp_intfc_details" }
203 func (*ProxyArpIntfcDetails) GetCrcString() string { return "f6458e5f" }
204 func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType {
205 return api.ReplyMessage
208 func (m *ProxyArpIntfcDetails) Size() int {
213 size += 4 // m.SwIfIndex
216 func (m *ProxyArpIntfcDetails) Marshal(b []byte) ([]byte, error) {
217 var buf *codec.Buffer
219 buf = codec.NewBuffer(make([]byte, m.Size()))
221 buf = codec.NewBuffer(b)
223 buf.EncodeUint32(uint32(m.SwIfIndex))
224 return buf.Bytes(), nil
226 func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error {
227 buf := codec.NewBuffer(b)
228 m.SwIfIndex = buf.DecodeUint32()
232 // ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'.
233 type ProxyArpIntfcDump struct{}
235 func (m *ProxyArpIntfcDump) Reset() { *m = ProxyArpIntfcDump{} }
236 func (*ProxyArpIntfcDump) GetMessageName() string { return "proxy_arp_intfc_dump" }
237 func (*ProxyArpIntfcDump) GetCrcString() string { return "51077d14" }
238 func (*ProxyArpIntfcDump) GetMessageType() api.MessageType {
239 return api.RequestMessage
242 func (m *ProxyArpIntfcDump) Size() int {
249 func (m *ProxyArpIntfcDump) Marshal(b []byte) ([]byte, error) {
250 var buf *codec.Buffer
252 buf = codec.NewBuffer(make([]byte, m.Size()))
254 buf = codec.NewBuffer(b)
256 return buf.Bytes(), nil
258 func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error {
262 // ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'.
263 type ProxyArpIntfcEnableDisable struct {
264 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
265 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
268 func (m *ProxyArpIntfcEnableDisable) Reset() { *m = ProxyArpIntfcEnableDisable{} }
269 func (*ProxyArpIntfcEnableDisable) GetMessageName() string { return "proxy_arp_intfc_enable_disable" }
270 func (*ProxyArpIntfcEnableDisable) GetCrcString() string { return "ae6cfcfb" }
271 func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType {
272 return api.RequestMessage
275 func (m *ProxyArpIntfcEnableDisable) Size() int {
280 size += 4 // m.SwIfIndex
281 size += 1 // m.Enable
284 func (m *ProxyArpIntfcEnableDisable) Marshal(b []byte) ([]byte, error) {
285 var buf *codec.Buffer
287 buf = codec.NewBuffer(make([]byte, m.Size()))
289 buf = codec.NewBuffer(b)
291 buf.EncodeUint32(uint32(m.SwIfIndex))
292 buf.EncodeBool(m.Enable)
293 return buf.Bytes(), nil
295 func (m *ProxyArpIntfcEnableDisable) Unmarshal(b []byte) error {
296 buf := codec.NewBuffer(b)
297 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
298 m.Enable = buf.DecodeBool()
302 // ProxyArpIntfcEnableDisableReply defines message 'proxy_arp_intfc_enable_disable_reply'.
303 type ProxyArpIntfcEnableDisableReply struct {
304 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
307 func (m *ProxyArpIntfcEnableDisableReply) Reset() { *m = ProxyArpIntfcEnableDisableReply{} }
308 func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string {
309 return "proxy_arp_intfc_enable_disable_reply"
311 func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { return "e8d4e804" }
312 func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType {
313 return api.ReplyMessage
316 func (m *ProxyArpIntfcEnableDisableReply) Size() int {
321 size += 4 // m.Retval
324 func (m *ProxyArpIntfcEnableDisableReply) Marshal(b []byte) ([]byte, error) {
325 var buf *codec.Buffer
327 buf = codec.NewBuffer(make([]byte, m.Size()))
329 buf = codec.NewBuffer(b)
331 buf.EncodeUint32(uint32(m.Retval))
332 return buf.Bytes(), nil
334 func (m *ProxyArpIntfcEnableDisableReply) Unmarshal(b []byte) error {
335 buf := codec.NewBuffer(b)
336 m.Retval = int32(buf.DecodeUint32())
340 func init() { file_arp_binapi_init() }
341 func file_arp_binapi_init() {
342 api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_85486cbd")
343 api.RegisterMessage((*ProxyArpAddDelReply)(nil), "proxy_arp_add_del_reply_e8d4e804")
344 api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_9228c150")
345 api.RegisterMessage((*ProxyArpDump)(nil), "proxy_arp_dump_51077d14")
346 api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "proxy_arp_intfc_details_f6458e5f")
347 api.RegisterMessage((*ProxyArpIntfcDump)(nil), "proxy_arp_intfc_dump_51077d14")
348 api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "proxy_arp_intfc_enable_disable_ae6cfcfb")
349 api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "proxy_arp_intfc_enable_disable_reply_e8d4e804")
352 // Messages returns list of all messages in this module.
353 func AllMessages() []api.Message {
354 return []api.Message{
355 (*ProxyArpAddDel)(nil),
356 (*ProxyArpAddDelReply)(nil),
357 (*ProxyArpDetails)(nil),
358 (*ProxyArpDump)(nil),
359 (*ProxyArpIntfcDetails)(nil),
360 (*ProxyArpIntfcDump)(nil),
361 (*ProxyArpIntfcEnableDisable)(nil),
362 (*ProxyArpIntfcEnableDisableReply)(nil),