Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / vxlan / vxlan.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.5.0-dev
4 //  VPP:              20.01
5 // source: .vppapi/core/vxlan.api.json
6
7 // Package vxlan contains generated bindings for API file vxlan.api.
8 //
9 // Contents:
10 //   8 messages
11 //
12 package vxlan
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         codec "git.fd.io/govpp.git/codec"
17 )
18
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
24
25 const (
26         APIFile    = "vxlan"
27         APIVersion = "1.1.0"
28         VersionCrc = 0xa95aa271
29 )
30
31 // SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'.
32 type SwInterfaceSetVxlanBypass struct {
33         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
34         IsIPv6    uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
35         Enable    uint8  `binapi:"u8,name=enable" json:"enable,omitempty"`
36 }
37
38 func (m *SwInterfaceSetVxlanBypass) Reset()               { *m = SwInterfaceSetVxlanBypass{} }
39 func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" }
40 func (*SwInterfaceSetVxlanBypass) GetCrcString() string   { return "e74ca095" }
41 func (*SwInterfaceSetVxlanBypass) GetMessageType() api.MessageType {
42         return api.RequestMessage
43 }
44
45 func (m *SwInterfaceSetVxlanBypass) Size() (size int) {
46         if m == nil {
47                 return 0
48         }
49         size += 4 // m.SwIfIndex
50         size += 1 // m.IsIPv6
51         size += 1 // m.Enable
52         return size
53 }
54 func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) {
55         if b == nil {
56                 b = make([]byte, m.Size())
57         }
58         buf := codec.NewBuffer(b)
59         buf.EncodeUint32(m.SwIfIndex)
60         buf.EncodeUint8(m.IsIPv6)
61         buf.EncodeUint8(m.Enable)
62         return buf.Bytes(), nil
63 }
64 func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error {
65         buf := codec.NewBuffer(b)
66         m.SwIfIndex = buf.DecodeUint32()
67         m.IsIPv6 = buf.DecodeUint8()
68         m.Enable = buf.DecodeUint8()
69         return nil
70 }
71
72 // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'.
73 type SwInterfaceSetVxlanBypassReply struct {
74         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
75 }
76
77 func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} }
78 func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string {
79         return "sw_interface_set_vxlan_bypass_reply"
80 }
81 func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" }
82 func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType {
83         return api.ReplyMessage
84 }
85
86 func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) {
87         if m == nil {
88                 return 0
89         }
90         size += 4 // m.Retval
91         return size
92 }
93 func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) {
94         if b == nil {
95                 b = make([]byte, m.Size())
96         }
97         buf := codec.NewBuffer(b)
98         buf.EncodeInt32(m.Retval)
99         return buf.Bytes(), nil
100 }
101 func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error {
102         buf := codec.NewBuffer(b)
103         m.Retval = buf.DecodeInt32()
104         return nil
105 }
106
107 // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'.
108 type VxlanAddDelTunnel struct {
109         IsAdd          uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
110         IsIPv6         uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
111         Instance       uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
112         SrcAddress     []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
113         DstAddress     []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
114         McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
115         EncapVrfID     uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
116         DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
117         Vni            uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
118 }
119
120 func (m *VxlanAddDelTunnel) Reset()               { *m = VxlanAddDelTunnel{} }
121 func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" }
122 func (*VxlanAddDelTunnel) GetCrcString() string   { return "00f4bdd0" }
123 func (*VxlanAddDelTunnel) GetMessageType() api.MessageType {
124         return api.RequestMessage
125 }
126
127 func (m *VxlanAddDelTunnel) Size() (size int) {
128         if m == nil {
129                 return 0
130         }
131         size += 1      // m.IsAdd
132         size += 1      // m.IsIPv6
133         size += 4      // m.Instance
134         size += 1 * 16 // m.SrcAddress
135         size += 1 * 16 // m.DstAddress
136         size += 4      // m.McastSwIfIndex
137         size += 4      // m.EncapVrfID
138         size += 4      // m.DecapNextIndex
139         size += 4      // m.Vni
140         return size
141 }
142 func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
143         if b == nil {
144                 b = make([]byte, m.Size())
145         }
146         buf := codec.NewBuffer(b)
147         buf.EncodeUint8(m.IsAdd)
148         buf.EncodeUint8(m.IsIPv6)
149         buf.EncodeUint32(m.Instance)
150         buf.EncodeBytes(m.SrcAddress, 16)
151         buf.EncodeBytes(m.DstAddress, 16)
152         buf.EncodeUint32(m.McastSwIfIndex)
153         buf.EncodeUint32(m.EncapVrfID)
154         buf.EncodeUint32(m.DecapNextIndex)
155         buf.EncodeUint32(m.Vni)
156         return buf.Bytes(), nil
157 }
158 func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error {
159         buf := codec.NewBuffer(b)
160         m.IsAdd = buf.DecodeUint8()
161         m.IsIPv6 = buf.DecodeUint8()
162         m.Instance = buf.DecodeUint32()
163         m.SrcAddress = make([]byte, 16)
164         copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
165         m.DstAddress = make([]byte, 16)
166         copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
167         m.McastSwIfIndex = buf.DecodeUint32()
168         m.EncapVrfID = buf.DecodeUint32()
169         m.DecapNextIndex = buf.DecodeUint32()
170         m.Vni = buf.DecodeUint32()
171         return nil
172 }
173
174 // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'.
175 type VxlanAddDelTunnelReply struct {
176         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
177         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
178 }
179
180 func (m *VxlanAddDelTunnelReply) Reset()               { *m = VxlanAddDelTunnelReply{} }
181 func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" }
182 func (*VxlanAddDelTunnelReply) GetCrcString() string   { return "fda5941f" }
183 func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType {
184         return api.ReplyMessage
185 }
186
187 func (m *VxlanAddDelTunnelReply) Size() (size int) {
188         if m == nil {
189                 return 0
190         }
191         size += 4 // m.Retval
192         size += 4 // m.SwIfIndex
193         return size
194 }
195 func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
196         if b == nil {
197                 b = make([]byte, m.Size())
198         }
199         buf := codec.NewBuffer(b)
200         buf.EncodeInt32(m.Retval)
201         buf.EncodeUint32(m.SwIfIndex)
202         return buf.Bytes(), nil
203 }
204 func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
205         buf := codec.NewBuffer(b)
206         m.Retval = buf.DecodeInt32()
207         m.SwIfIndex = buf.DecodeUint32()
208         return nil
209 }
210
211 // VxlanOffloadRx defines message 'vxlan_offload_rx'.
212 type VxlanOffloadRx struct {
213         HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
214         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
215         Enable    uint8  `binapi:"u8,name=enable" json:"enable,omitempty"`
216 }
217
218 func (m *VxlanOffloadRx) Reset()               { *m = VxlanOffloadRx{} }
219 func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" }
220 func (*VxlanOffloadRx) GetCrcString() string   { return "f0b08786" }
221 func (*VxlanOffloadRx) GetMessageType() api.MessageType {
222         return api.RequestMessage
223 }
224
225 func (m *VxlanOffloadRx) Size() (size int) {
226         if m == nil {
227                 return 0
228         }
229         size += 4 // m.HwIfIndex
230         size += 4 // m.SwIfIndex
231         size += 1 // m.Enable
232         return size
233 }
234 func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) {
235         if b == nil {
236                 b = make([]byte, m.Size())
237         }
238         buf := codec.NewBuffer(b)
239         buf.EncodeUint32(m.HwIfIndex)
240         buf.EncodeUint32(m.SwIfIndex)
241         buf.EncodeUint8(m.Enable)
242         return buf.Bytes(), nil
243 }
244 func (m *VxlanOffloadRx) Unmarshal(b []byte) error {
245         buf := codec.NewBuffer(b)
246         m.HwIfIndex = buf.DecodeUint32()
247         m.SwIfIndex = buf.DecodeUint32()
248         m.Enable = buf.DecodeUint8()
249         return nil
250 }
251
252 // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'.
253 type VxlanOffloadRxReply struct {
254         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
255 }
256
257 func (m *VxlanOffloadRxReply) Reset()               { *m = VxlanOffloadRxReply{} }
258 func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" }
259 func (*VxlanOffloadRxReply) GetCrcString() string   { return "e8d4e804" }
260 func (*VxlanOffloadRxReply) GetMessageType() api.MessageType {
261         return api.ReplyMessage
262 }
263
264 func (m *VxlanOffloadRxReply) Size() (size int) {
265         if m == nil {
266                 return 0
267         }
268         size += 4 // m.Retval
269         return size
270 }
271 func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) {
272         if b == nil {
273                 b = make([]byte, m.Size())
274         }
275         buf := codec.NewBuffer(b)
276         buf.EncodeInt32(m.Retval)
277         return buf.Bytes(), nil
278 }
279 func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error {
280         buf := codec.NewBuffer(b)
281         m.Retval = buf.DecodeInt32()
282         return nil
283 }
284
285 // VxlanTunnelDetails defines message 'vxlan_tunnel_details'.
286 type VxlanTunnelDetails struct {
287         SwIfIndex      uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
288         Instance       uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
289         SrcAddress     []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
290         DstAddress     []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
291         McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
292         EncapVrfID     uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
293         DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
294         Vni            uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
295         IsIPv6         uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
296 }
297
298 func (m *VxlanTunnelDetails) Reset()               { *m = VxlanTunnelDetails{} }
299 func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" }
300 func (*VxlanTunnelDetails) GetCrcString() string   { return "ce38e127" }
301 func (*VxlanTunnelDetails) GetMessageType() api.MessageType {
302         return api.ReplyMessage
303 }
304
305 func (m *VxlanTunnelDetails) Size() (size int) {
306         if m == nil {
307                 return 0
308         }
309         size += 4      // m.SwIfIndex
310         size += 4      // m.Instance
311         size += 1 * 16 // m.SrcAddress
312         size += 1 * 16 // m.DstAddress
313         size += 4      // m.McastSwIfIndex
314         size += 4      // m.EncapVrfID
315         size += 4      // m.DecapNextIndex
316         size += 4      // m.Vni
317         size += 1      // m.IsIPv6
318         return size
319 }
320 func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
321         if b == nil {
322                 b = make([]byte, m.Size())
323         }
324         buf := codec.NewBuffer(b)
325         buf.EncodeUint32(m.SwIfIndex)
326         buf.EncodeUint32(m.Instance)
327         buf.EncodeBytes(m.SrcAddress, 16)
328         buf.EncodeBytes(m.DstAddress, 16)
329         buf.EncodeUint32(m.McastSwIfIndex)
330         buf.EncodeUint32(m.EncapVrfID)
331         buf.EncodeUint32(m.DecapNextIndex)
332         buf.EncodeUint32(m.Vni)
333         buf.EncodeUint8(m.IsIPv6)
334         return buf.Bytes(), nil
335 }
336 func (m *VxlanTunnelDetails) Unmarshal(b []byte) error {
337         buf := codec.NewBuffer(b)
338         m.SwIfIndex = buf.DecodeUint32()
339         m.Instance = buf.DecodeUint32()
340         m.SrcAddress = make([]byte, 16)
341         copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
342         m.DstAddress = make([]byte, 16)
343         copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
344         m.McastSwIfIndex = buf.DecodeUint32()
345         m.EncapVrfID = buf.DecodeUint32()
346         m.DecapNextIndex = buf.DecodeUint32()
347         m.Vni = buf.DecodeUint32()
348         m.IsIPv6 = buf.DecodeUint8()
349         return nil
350 }
351
352 // VxlanTunnelDump defines message 'vxlan_tunnel_dump'.
353 type VxlanTunnelDump struct {
354         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
355 }
356
357 func (m *VxlanTunnelDump) Reset()               { *m = VxlanTunnelDump{} }
358 func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" }
359 func (*VxlanTunnelDump) GetCrcString() string   { return "529cb13f" }
360 func (*VxlanTunnelDump) GetMessageType() api.MessageType {
361         return api.RequestMessage
362 }
363
364 func (m *VxlanTunnelDump) Size() (size int) {
365         if m == nil {
366                 return 0
367         }
368         size += 4 // m.SwIfIndex
369         return size
370 }
371 func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
372         if b == nil {
373                 b = make([]byte, m.Size())
374         }
375         buf := codec.NewBuffer(b)
376         buf.EncodeUint32(m.SwIfIndex)
377         return buf.Bytes(), nil
378 }
379 func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
380         buf := codec.NewBuffer(b)
381         m.SwIfIndex = buf.DecodeUint32()
382         return nil
383 }
384
385 func init() { file_vxlan_binapi_init() }
386 func file_vxlan_binapi_init() {
387         api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_e74ca095")
388         api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804")
389         api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_00f4bdd0")
390         api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_fda5941f")
391         api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_f0b08786")
392         api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804")
393         api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_ce38e127")
394         api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_529cb13f")
395 }
396
397 // Messages returns list of all messages in this module.
398 func AllMessages() []api.Message {
399         return []api.Message{
400                 (*SwInterfaceSetVxlanBypass)(nil),
401                 (*SwInterfaceSetVxlanBypassReply)(nil),
402                 (*VxlanAddDelTunnel)(nil),
403                 (*VxlanAddDelTunnelReply)(nil),
404                 (*VxlanOffloadRx)(nil),
405                 (*VxlanOffloadRxReply)(nil),
406                 (*VxlanTunnelDetails)(nil),
407                 (*VxlanTunnelDump)(nil),
408         }
409 }