1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/vxlan.api.json
7 // Package vxlan contains generated bindings for API file vxlan.api.
15 api "git.fd.io/govpp.git/api"
16 codec "git.fd.io/govpp.git/codec"
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
28 VersionCrc = 0xa95aa271
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"`
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
45 func (m *SwInterfaceSetVxlanBypass) Size() (size int) {
49 size += 4 // m.SwIfIndex
54 func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) {
56 b = make([]byte, m.Size())
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
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()
72 // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'.
73 type SwInterfaceSetVxlanBypassReply struct {
74 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
77 func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} }
78 func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string {
79 return "sw_interface_set_vxlan_bypass_reply"
81 func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" }
82 func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType {
83 return api.ReplyMessage
86 func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) {
93 func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) {
95 b = make([]byte, m.Size())
97 buf := codec.NewBuffer(b)
98 buf.EncodeInt32(m.Retval)
99 return buf.Bytes(), nil
101 func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error {
102 buf := codec.NewBuffer(b)
103 m.Retval = buf.DecodeInt32()
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"`
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
127 func (m *VxlanAddDelTunnel) Size() (size int) {
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
142 func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
144 b = make([]byte, m.Size())
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
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()
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"`
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
187 func (m *VxlanAddDelTunnelReply) Size() (size int) {
191 size += 4 // m.Retval
192 size += 4 // m.SwIfIndex
195 func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
197 b = make([]byte, m.Size())
199 buf := codec.NewBuffer(b)
200 buf.EncodeInt32(m.Retval)
201 buf.EncodeUint32(m.SwIfIndex)
202 return buf.Bytes(), nil
204 func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
205 buf := codec.NewBuffer(b)
206 m.Retval = buf.DecodeInt32()
207 m.SwIfIndex = buf.DecodeUint32()
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"`
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
225 func (m *VxlanOffloadRx) Size() (size int) {
229 size += 4 // m.HwIfIndex
230 size += 4 // m.SwIfIndex
231 size += 1 // m.Enable
234 func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) {
236 b = make([]byte, m.Size())
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
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()
252 // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'.
253 type VxlanOffloadRxReply struct {
254 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
264 func (m *VxlanOffloadRxReply) Size() (size int) {
268 size += 4 // m.Retval
271 func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) {
273 b = make([]byte, m.Size())
275 buf := codec.NewBuffer(b)
276 buf.EncodeInt32(m.Retval)
277 return buf.Bytes(), nil
279 func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error {
280 buf := codec.NewBuffer(b)
281 m.Retval = buf.DecodeInt32()
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"`
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
305 func (m *VxlanTunnelDetails) Size() (size int) {
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
317 size += 1 // m.IsIPv6
320 func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
322 b = make([]byte, m.Size())
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
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()
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"`
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
364 func (m *VxlanTunnelDump) Size() (size int) {
368 size += 4 // m.SwIfIndex
371 func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
373 b = make([]byte, m.Size())
375 buf := codec.NewBuffer(b)
376 buf.EncodeUint32(m.SwIfIndex)
377 return buf.Bytes(), nil
379 func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
380 buf := codec.NewBuffer(b)
381 m.SwIfIndex = buf.DecodeUint32()
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")
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),