1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package arp contains generated bindings for API file arp.api.
15 api "git.fd.io/govpp.git/api"
16 _ "git.fd.io/govpp.git/binapi/ethernet_types"
17 interface_types "git.fd.io/govpp.git/binapi/interface_types"
18 ip_types "git.fd.io/govpp.git/binapi/ip_types"
19 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0x79ca86f2
34 // ProxyArp defines type 'proxy_arp'.
35 type ProxyArp struct {
36 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
37 Low ip_types.IP4Address `binapi:"ip4_address,name=low" json:"low,omitempty"`
38 Hi ip_types.IP4Address `binapi:"ip4_address,name=hi" json:"hi,omitempty"`
41 // ProxyArpAddDel defines message 'proxy_arp_add_del'.
42 type ProxyArpAddDel struct {
43 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
44 Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
47 func (m *ProxyArpAddDel) Reset() { *m = ProxyArpAddDel{} }
48 func (*ProxyArpAddDel) GetMessageName() string { return "proxy_arp_add_del" }
49 func (*ProxyArpAddDel) GetCrcString() string { return "85486cbd" }
50 func (*ProxyArpAddDel) GetMessageType() api.MessageType {
51 return api.RequestMessage
54 func (m *ProxyArpAddDel) Size() (size int) {
59 size += 4 // m.Proxy.TableID
60 size += 1 * 4 // m.Proxy.Low
61 size += 1 * 4 // m.Proxy.Hi
64 func (m *ProxyArpAddDel) Marshal(b []byte) ([]byte, error) {
66 b = make([]byte, m.Size())
68 buf := codec.NewBuffer(b)
69 buf.EncodeBool(m.IsAdd)
70 buf.EncodeUint32(m.Proxy.TableID)
71 buf.EncodeBytes(m.Proxy.Low[:], 4)
72 buf.EncodeBytes(m.Proxy.Hi[:], 4)
73 return buf.Bytes(), nil
75 func (m *ProxyArpAddDel) Unmarshal(b []byte) error {
76 buf := codec.NewBuffer(b)
77 m.IsAdd = buf.DecodeBool()
78 m.Proxy.TableID = buf.DecodeUint32()
79 copy(m.Proxy.Low[:], buf.DecodeBytes(4))
80 copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
84 // ProxyArpAddDelReply defines message 'proxy_arp_add_del_reply'.
85 type ProxyArpAddDelReply struct {
86 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
89 func (m *ProxyArpAddDelReply) Reset() { *m = ProxyArpAddDelReply{} }
90 func (*ProxyArpAddDelReply) GetMessageName() string { return "proxy_arp_add_del_reply" }
91 func (*ProxyArpAddDelReply) GetCrcString() string { return "e8d4e804" }
92 func (*ProxyArpAddDelReply) GetMessageType() api.MessageType {
93 return api.ReplyMessage
96 func (m *ProxyArpAddDelReply) Size() (size int) {
100 size += 4 // m.Retval
103 func (m *ProxyArpAddDelReply) Marshal(b []byte) ([]byte, error) {
105 b = make([]byte, m.Size())
107 buf := codec.NewBuffer(b)
108 buf.EncodeInt32(m.Retval)
109 return buf.Bytes(), nil
111 func (m *ProxyArpAddDelReply) Unmarshal(b []byte) error {
112 buf := codec.NewBuffer(b)
113 m.Retval = buf.DecodeInt32()
117 // ProxyArpDetails defines message 'proxy_arp_details'.
118 type ProxyArpDetails struct {
119 Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
122 func (m *ProxyArpDetails) Reset() { *m = ProxyArpDetails{} }
123 func (*ProxyArpDetails) GetMessageName() string { return "proxy_arp_details" }
124 func (*ProxyArpDetails) GetCrcString() string { return "9228c150" }
125 func (*ProxyArpDetails) GetMessageType() api.MessageType {
126 return api.ReplyMessage
129 func (m *ProxyArpDetails) Size() (size int) {
133 size += 4 // m.Proxy.TableID
134 size += 1 * 4 // m.Proxy.Low
135 size += 1 * 4 // m.Proxy.Hi
138 func (m *ProxyArpDetails) Marshal(b []byte) ([]byte, error) {
140 b = make([]byte, m.Size())
142 buf := codec.NewBuffer(b)
143 buf.EncodeUint32(m.Proxy.TableID)
144 buf.EncodeBytes(m.Proxy.Low[:], 4)
145 buf.EncodeBytes(m.Proxy.Hi[:], 4)
146 return buf.Bytes(), nil
148 func (m *ProxyArpDetails) Unmarshal(b []byte) error {
149 buf := codec.NewBuffer(b)
150 m.Proxy.TableID = buf.DecodeUint32()
151 copy(m.Proxy.Low[:], buf.DecodeBytes(4))
152 copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
156 // ProxyArpDump defines message 'proxy_arp_dump'.
157 type ProxyArpDump struct{}
159 func (m *ProxyArpDump) Reset() { *m = ProxyArpDump{} }
160 func (*ProxyArpDump) GetMessageName() string { return "proxy_arp_dump" }
161 func (*ProxyArpDump) GetCrcString() string { return "51077d14" }
162 func (*ProxyArpDump) GetMessageType() api.MessageType {
163 return api.RequestMessage
166 func (m *ProxyArpDump) Size() (size int) {
172 func (m *ProxyArpDump) Marshal(b []byte) ([]byte, error) {
174 b = make([]byte, m.Size())
176 buf := codec.NewBuffer(b)
177 return buf.Bytes(), nil
179 func (m *ProxyArpDump) Unmarshal(b []byte) error {
183 // ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'.
184 type ProxyArpIntfcDetails struct {
185 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
188 func (m *ProxyArpIntfcDetails) Reset() { *m = ProxyArpIntfcDetails{} }
189 func (*ProxyArpIntfcDetails) GetMessageName() string { return "proxy_arp_intfc_details" }
190 func (*ProxyArpIntfcDetails) GetCrcString() string { return "f6458e5f" }
191 func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType {
192 return api.ReplyMessage
195 func (m *ProxyArpIntfcDetails) Size() (size int) {
199 size += 4 // m.SwIfIndex
202 func (m *ProxyArpIntfcDetails) Marshal(b []byte) ([]byte, error) {
204 b = make([]byte, m.Size())
206 buf := codec.NewBuffer(b)
207 buf.EncodeUint32(m.SwIfIndex)
208 return buf.Bytes(), nil
210 func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error {
211 buf := codec.NewBuffer(b)
212 m.SwIfIndex = buf.DecodeUint32()
216 // ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'.
217 type ProxyArpIntfcDump struct{}
219 func (m *ProxyArpIntfcDump) Reset() { *m = ProxyArpIntfcDump{} }
220 func (*ProxyArpIntfcDump) GetMessageName() string { return "proxy_arp_intfc_dump" }
221 func (*ProxyArpIntfcDump) GetCrcString() string { return "51077d14" }
222 func (*ProxyArpIntfcDump) GetMessageType() api.MessageType {
223 return api.RequestMessage
226 func (m *ProxyArpIntfcDump) Size() (size int) {
232 func (m *ProxyArpIntfcDump) Marshal(b []byte) ([]byte, error) {
234 b = make([]byte, m.Size())
236 buf := codec.NewBuffer(b)
237 return buf.Bytes(), nil
239 func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error {
243 // ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'.
244 type ProxyArpIntfcEnableDisable struct {
245 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
246 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
249 func (m *ProxyArpIntfcEnableDisable) Reset() { *m = ProxyArpIntfcEnableDisable{} }
250 func (*ProxyArpIntfcEnableDisable) GetMessageName() string { return "proxy_arp_intfc_enable_disable" }
251 func (*ProxyArpIntfcEnableDisable) GetCrcString() string { return "ae6cfcfb" }
252 func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType {
253 return api.RequestMessage
256 func (m *ProxyArpIntfcEnableDisable) Size() (size int) {
260 size += 4 // m.SwIfIndex
261 size += 1 // m.Enable
264 func (m *ProxyArpIntfcEnableDisable) Marshal(b []byte) ([]byte, error) {
266 b = make([]byte, m.Size())
268 buf := codec.NewBuffer(b)
269 buf.EncodeUint32(uint32(m.SwIfIndex))
270 buf.EncodeBool(m.Enable)
271 return buf.Bytes(), nil
273 func (m *ProxyArpIntfcEnableDisable) Unmarshal(b []byte) error {
274 buf := codec.NewBuffer(b)
275 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
276 m.Enable = buf.DecodeBool()
280 // ProxyArpIntfcEnableDisableReply defines message 'proxy_arp_intfc_enable_disable_reply'.
281 type ProxyArpIntfcEnableDisableReply struct {
282 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
285 func (m *ProxyArpIntfcEnableDisableReply) Reset() { *m = ProxyArpIntfcEnableDisableReply{} }
286 func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string {
287 return "proxy_arp_intfc_enable_disable_reply"
289 func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { return "e8d4e804" }
290 func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType {
291 return api.ReplyMessage
294 func (m *ProxyArpIntfcEnableDisableReply) Size() (size int) {
298 size += 4 // m.Retval
301 func (m *ProxyArpIntfcEnableDisableReply) Marshal(b []byte) ([]byte, error) {
303 b = make([]byte, m.Size())
305 buf := codec.NewBuffer(b)
306 buf.EncodeInt32(m.Retval)
307 return buf.Bytes(), nil
309 func (m *ProxyArpIntfcEnableDisableReply) Unmarshal(b []byte) error {
310 buf := codec.NewBuffer(b)
311 m.Retval = buf.DecodeInt32()
315 func init() { file_arp_binapi_init() }
316 func file_arp_binapi_init() {
317 api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_85486cbd")
318 api.RegisterMessage((*ProxyArpAddDelReply)(nil), "proxy_arp_add_del_reply_e8d4e804")
319 api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_9228c150")
320 api.RegisterMessage((*ProxyArpDump)(nil), "proxy_arp_dump_51077d14")
321 api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "proxy_arp_intfc_details_f6458e5f")
322 api.RegisterMessage((*ProxyArpIntfcDump)(nil), "proxy_arp_intfc_dump_51077d14")
323 api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "proxy_arp_intfc_enable_disable_ae6cfcfb")
324 api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "proxy_arp_intfc_enable_disable_reply_e8d4e804")
327 // Messages returns list of all messages in this module.
328 func AllMessages() []api.Message {
329 return []api.Message{
330 (*ProxyArpAddDel)(nil),
331 (*ProxyArpAddDelReply)(nil),
332 (*ProxyArpDetails)(nil),
333 (*ProxyArpDump)(nil),
334 (*ProxyArpIntfcDetails)(nil),
335 (*ProxyArpIntfcDump)(nil),
336 (*ProxyArpIntfcEnableDisable)(nil),
337 (*ProxyArpIntfcEnableDisableReply)(nil),