Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / vxlan_gpe / vxlan_gpe.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_gpe.api.json
6
7 // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
8 //
9 // Contents:
10 //   6 messages
11 //
12 package vxlan_gpe
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_gpe"
27         APIVersion = "1.0.0"
28         VersionCrc = 0x25bfb55d
29 )
30
31 // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
32 type SwInterfaceSetVxlanGpeBypass 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 *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} }
39 func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
40         return "sw_interface_set_vxlan_gpe_bypass"
41 }
42 func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "e74ca095" }
43 func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
44         return api.RequestMessage
45 }
46
47 func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) {
48         if m == nil {
49                 return 0
50         }
51         size += 4 // m.SwIfIndex
52         size += 1 // m.IsIPv6
53         size += 1 // m.Enable
54         return size
55 }
56 func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) {
57         if b == nil {
58                 b = make([]byte, m.Size())
59         }
60         buf := codec.NewBuffer(b)
61         buf.EncodeUint32(m.SwIfIndex)
62         buf.EncodeUint8(m.IsIPv6)
63         buf.EncodeUint8(m.Enable)
64         return buf.Bytes(), nil
65 }
66 func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error {
67         buf := codec.NewBuffer(b)
68         m.SwIfIndex = buf.DecodeUint32()
69         m.IsIPv6 = buf.DecodeUint8()
70         m.Enable = buf.DecodeUint8()
71         return nil
72 }
73
74 // SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'.
75 type SwInterfaceSetVxlanGpeBypassReply struct {
76         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
77 }
78
79 func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} }
80 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
81         return "sw_interface_set_vxlan_gpe_bypass_reply"
82 }
83 func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" }
84 func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
85         return api.ReplyMessage
86 }
87
88 func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) {
89         if m == nil {
90                 return 0
91         }
92         size += 4 // m.Retval
93         return size
94 }
95 func (m *SwInterfaceSetVxlanGpeBypassReply) Marshal(b []byte) ([]byte, error) {
96         if b == nil {
97                 b = make([]byte, m.Size())
98         }
99         buf := codec.NewBuffer(b)
100         buf.EncodeInt32(m.Retval)
101         return buf.Bytes(), nil
102 }
103 func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error {
104         buf := codec.NewBuffer(b)
105         m.Retval = buf.DecodeInt32()
106         return nil
107 }
108
109 // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'.
110 type VxlanGpeAddDelTunnel struct {
111         IsIPv6         uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
112         Local          []byte `binapi:"u8[16],name=local" json:"local,omitempty"`
113         Remote         []byte `binapi:"u8[16],name=remote" json:"remote,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         DecapVrfID     uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
117         Protocol       uint8  `binapi:"u8,name=protocol" json:"protocol,omitempty"`
118         Vni            uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
119         IsAdd          uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
120 }
121
122 func (m *VxlanGpeAddDelTunnel) Reset()               { *m = VxlanGpeAddDelTunnel{} }
123 func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" }
124 func (*VxlanGpeAddDelTunnel) GetCrcString() string   { return "d15850ba" }
125 func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
126         return api.RequestMessage
127 }
128
129 func (m *VxlanGpeAddDelTunnel) Size() (size int) {
130         if m == nil {
131                 return 0
132         }
133         size += 1      // m.IsIPv6
134         size += 1 * 16 // m.Local
135         size += 1 * 16 // m.Remote
136         size += 4      // m.McastSwIfIndex
137         size += 4      // m.EncapVrfID
138         size += 4      // m.DecapVrfID
139         size += 1      // m.Protocol
140         size += 4      // m.Vni
141         size += 1      // m.IsAdd
142         return size
143 }
144 func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) {
145         if b == nil {
146                 b = make([]byte, m.Size())
147         }
148         buf := codec.NewBuffer(b)
149         buf.EncodeUint8(m.IsIPv6)
150         buf.EncodeBytes(m.Local, 16)
151         buf.EncodeBytes(m.Remote, 16)
152         buf.EncodeUint32(m.McastSwIfIndex)
153         buf.EncodeUint32(m.EncapVrfID)
154         buf.EncodeUint32(m.DecapVrfID)
155         buf.EncodeUint8(m.Protocol)
156         buf.EncodeUint32(m.Vni)
157         buf.EncodeUint8(m.IsAdd)
158         return buf.Bytes(), nil
159 }
160 func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error {
161         buf := codec.NewBuffer(b)
162         m.IsIPv6 = buf.DecodeUint8()
163         m.Local = make([]byte, 16)
164         copy(m.Local, buf.DecodeBytes(len(m.Local)))
165         m.Remote = make([]byte, 16)
166         copy(m.Remote, buf.DecodeBytes(len(m.Remote)))
167         m.McastSwIfIndex = buf.DecodeUint32()
168         m.EncapVrfID = buf.DecodeUint32()
169         m.DecapVrfID = buf.DecodeUint32()
170         m.Protocol = buf.DecodeUint8()
171         m.Vni = buf.DecodeUint32()
172         m.IsAdd = buf.DecodeUint8()
173         return nil
174 }
175
176 // VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'.
177 type VxlanGpeAddDelTunnelReply struct {
178         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
179         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
180 }
181
182 func (m *VxlanGpeAddDelTunnelReply) Reset()               { *m = VxlanGpeAddDelTunnelReply{} }
183 func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" }
184 func (*VxlanGpeAddDelTunnelReply) GetCrcString() string   { return "fda5941f" }
185 func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
186         return api.ReplyMessage
187 }
188
189 func (m *VxlanGpeAddDelTunnelReply) Size() (size int) {
190         if m == nil {
191                 return 0
192         }
193         size += 4 // m.Retval
194         size += 4 // m.SwIfIndex
195         return size
196 }
197 func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
198         if b == nil {
199                 b = make([]byte, m.Size())
200         }
201         buf := codec.NewBuffer(b)
202         buf.EncodeInt32(m.Retval)
203         buf.EncodeUint32(m.SwIfIndex)
204         return buf.Bytes(), nil
205 }
206 func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
207         buf := codec.NewBuffer(b)
208         m.Retval = buf.DecodeInt32()
209         m.SwIfIndex = buf.DecodeUint32()
210         return nil
211 }
212
213 // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
214 type VxlanGpeTunnelDetails struct {
215         SwIfIndex      uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
216         Local          []byte `binapi:"u8[16],name=local" json:"local,omitempty"`
217         Remote         []byte `binapi:"u8[16],name=remote" json:"remote,omitempty"`
218         Vni            uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
219         Protocol       uint8  `binapi:"u8,name=protocol" json:"protocol,omitempty"`
220         McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
221         EncapVrfID     uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
222         DecapVrfID     uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
223         IsIPv6         uint8  `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
224 }
225
226 func (m *VxlanGpeTunnelDetails) Reset()               { *m = VxlanGpeTunnelDetails{} }
227 func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" }
228 func (*VxlanGpeTunnelDetails) GetCrcString() string   { return "2673fbfa" }
229 func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
230         return api.ReplyMessage
231 }
232
233 func (m *VxlanGpeTunnelDetails) Size() (size int) {
234         if m == nil {
235                 return 0
236         }
237         size += 4      // m.SwIfIndex
238         size += 1 * 16 // m.Local
239         size += 1 * 16 // m.Remote
240         size += 4      // m.Vni
241         size += 1      // m.Protocol
242         size += 4      // m.McastSwIfIndex
243         size += 4      // m.EncapVrfID
244         size += 4      // m.DecapVrfID
245         size += 1      // m.IsIPv6
246         return size
247 }
248 func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) {
249         if b == nil {
250                 b = make([]byte, m.Size())
251         }
252         buf := codec.NewBuffer(b)
253         buf.EncodeUint32(m.SwIfIndex)
254         buf.EncodeBytes(m.Local, 16)
255         buf.EncodeBytes(m.Remote, 16)
256         buf.EncodeUint32(m.Vni)
257         buf.EncodeUint8(m.Protocol)
258         buf.EncodeUint32(m.McastSwIfIndex)
259         buf.EncodeUint32(m.EncapVrfID)
260         buf.EncodeUint32(m.DecapVrfID)
261         buf.EncodeUint8(m.IsIPv6)
262         return buf.Bytes(), nil
263 }
264 func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error {
265         buf := codec.NewBuffer(b)
266         m.SwIfIndex = buf.DecodeUint32()
267         m.Local = make([]byte, 16)
268         copy(m.Local, buf.DecodeBytes(len(m.Local)))
269         m.Remote = make([]byte, 16)
270         copy(m.Remote, buf.DecodeBytes(len(m.Remote)))
271         m.Vni = buf.DecodeUint32()
272         m.Protocol = buf.DecodeUint8()
273         m.McastSwIfIndex = buf.DecodeUint32()
274         m.EncapVrfID = buf.DecodeUint32()
275         m.DecapVrfID = buf.DecodeUint32()
276         m.IsIPv6 = buf.DecodeUint8()
277         return nil
278 }
279
280 // VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'.
281 type VxlanGpeTunnelDump struct {
282         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
283 }
284
285 func (m *VxlanGpeTunnelDump) Reset()               { *m = VxlanGpeTunnelDump{} }
286 func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" }
287 func (*VxlanGpeTunnelDump) GetCrcString() string   { return "529cb13f" }
288 func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
289         return api.RequestMessage
290 }
291
292 func (m *VxlanGpeTunnelDump) Size() (size int) {
293         if m == nil {
294                 return 0
295         }
296         size += 4 // m.SwIfIndex
297         return size
298 }
299 func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) {
300         if b == nil {
301                 b = make([]byte, m.Size())
302         }
303         buf := codec.NewBuffer(b)
304         buf.EncodeUint32(m.SwIfIndex)
305         return buf.Bytes(), nil
306 }
307 func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
308         buf := codec.NewBuffer(b)
309         m.SwIfIndex = buf.DecodeUint32()
310         return nil
311 }
312
313 func init() { file_vxlan_gpe_binapi_init() }
314 func file_vxlan_gpe_binapi_init() {
315         api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_e74ca095")
316         api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
317         api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_d15850ba")
318         api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_fda5941f")
319         api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_2673fbfa")
320         api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_529cb13f")
321 }
322
323 // Messages returns list of all messages in this module.
324 func AllMessages() []api.Message {
325         return []api.Message{
326                 (*SwInterfaceSetVxlanGpeBypass)(nil),
327                 (*SwInterfaceSetVxlanGpeBypassReply)(nil),
328                 (*VxlanGpeAddDelTunnel)(nil),
329                 (*VxlanGpeAddDelTunnelReply)(nil),
330                 (*VxlanGpeTunnelDetails)(nil),
331                 (*VxlanGpeTunnelDump)(nil),
332         }
333 }