summaryrefslogtreecommitdiffstats
path: root/binapi/vxlan_gpe/vxlan_gpe.ba.go
blob: aa68eb51e6f0b5855a3d9a192c42db47aba8f806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
//  binapi-generator: v0.5.0-dev
//  VPP:              21.06-release
// source: /usr/share/vpp/api/core/vxlan_gpe.api.json

// Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
//
// Contents:
//   6 messages
//
package vxlan_gpe

import (
	api "git.fd.io/govpp.git/api"
	interface_types "git.fd.io/govpp.git/binapi/interface_types"
	ip_types "git.fd.io/govpp.git/binapi/ip_types"
	codec "git.fd.io/govpp.git/codec"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the GoVPP api package it is being compiled against.
// A compilation error at this line likely means your copy of the
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2

const (
	APIFile    = "vxlan_gpe"
	APIVersion = "2.0.0"
	VersionCrc = 0x7a970d0b
)

// SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
type SwInterfaceSetVxlanGpeBypass struct {
	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
	IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
	Enable    bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
}

func (m *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} }
func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
	return "sw_interface_set_vxlan_gpe_bypass"
}
func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "65247409" }
func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4 // m.SwIfIndex
	size += 1 // m.IsIPv6
	size += 1 // m.Enable
	return size
}
func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeUint32(uint32(m.SwIfIndex))
	buf.EncodeBool(m.IsIPv6)
	buf.EncodeBool(m.Enable)
	return buf.Bytes(), nil
}
func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	m.IsIPv6 = buf.DecodeBool()
	m.Enable = buf.DecodeBool()
	return nil
}

// SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'.
type SwInterfaceSetVxlanGpeBypassReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} }
func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
	return "sw_interface_set_vxlan_gpe_bypass_reply"
}
func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" }
func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4 // m.Retval
	return size
}
func (m *SwInterfaceSetVxlanGpeBypassReply) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeInt32(m.Retval)
	return buf.Bytes(), nil
}
func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = buf.DecodeInt32()
	return nil
}

// VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'.
type VxlanGpeAddDelTunnel struct {
	Local          ip_types.Address               `binapi:"address,name=local" json:"local,omitempty"`
	Remote         ip_types.Address               `binapi:"address,name=remote" json:"remote,omitempty"`
	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
	DecapVrfID     uint32                         `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
	Protocol       ip_types.IPProto               `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
	IsAdd          bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
}

func (m *VxlanGpeAddDelTunnel) Reset()               { *m = VxlanGpeAddDelTunnel{} }
func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" }
func (*VxlanGpeAddDelTunnel) GetCrcString() string   { return "a645b2b0" }
func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *VxlanGpeAddDelTunnel) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 1      // m.Local.Af
	size += 1 * 16 // m.Local.Un
	size += 1      // m.Remote.Af
	size += 1 * 16 // m.Remote.Un
	size += 4      // m.McastSwIfIndex
	size += 4      // m.EncapVrfID
	size += 4      // m.DecapVrfID
	size += 1      // m.Protocol
	size += 4      // m.Vni
	size += 1      // m.IsAdd
	return size
}
func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeUint8(uint8(m.Local.Af))
	buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
	buf.EncodeUint8(uint8(m.Remote.Af))
	buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
	buf.EncodeUint32(uint32(m.McastSwIfIndex))
	buf.EncodeUint32(m.EncapVrfID)
	buf.EncodeUint32(m.DecapVrfID)
	buf.EncodeUint8(uint8(m.Protocol))
	buf.EncodeUint32(m.Vni)
	buf.EncodeBool(m.IsAdd)
	return buf.Bytes(), nil
}
func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
	copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
	m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
	copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	m.EncapVrfID = buf.DecodeUint32()
	m.DecapVrfID = buf.DecodeUint32()
	m.Protocol = ip_types.IPProto(buf.DecodeUint8())
	m.Vni = buf.DecodeUint32()
	m.IsAdd = buf.DecodeBool()
	return nil
}

// VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'.
type VxlanGpeAddDelTunnelReply struct {
	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}

func (m *VxlanGpeAddDelTunnelReply) Reset()               { *m = VxlanGpeAddDelTunnelReply{} }
func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" }
func (*VxlanGpeAddDelTunnelReply) GetCrcString() string   { return "5383d31f" }
func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *VxlanGpeAddDelTunnelReply) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4 // m.Retval
	size += 4 // m.SwIfIndex
	return size
}
func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeInt32(m.Retval)
	buf.EncodeUint32(uint32(m.SwIfIndex))
	return buf.Bytes(), nil
}
func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.Retval = buf.DecodeInt32()
	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	return nil
}

// VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
type VxlanGpeTunnelDetails struct {
	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
	Local          ip_types.Address               `binapi:"address,name=local" json:"local,omitempty"`
	Remote         ip_types.Address               `binapi:"address,name=remote" json:"remote,omitempty"`
	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
	Protocol       ip_types.IPProto               `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
	DecapVrfID     uint32                         `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
	IsIPv6         bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}

func (m *VxlanGpeTunnelDetails) Reset()               { *m = VxlanGpeTunnelDetails{} }
func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" }
func (*VxlanGpeTunnelDetails) GetCrcString() string   { return "0968fc8b" }
func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
	return api.ReplyMessage
}

func (m *VxlanGpeTunnelDetails) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4      // m.SwIfIndex
	size += 1      // m.Local.Af
	size += 1 * 16 // m.Local.Un
	size += 1      // m.Remote.Af
	size += 1 * 16 // m.Remote.Un
	size += 4      // m.Vni
	size += 1      // m.Protocol
	size += 4      // m.McastSwIfIndex
	size += 4      // m.EncapVrfID
	size += 4      // m.DecapVrfID
	size += 1      // m.IsIPv6
	return size
}
func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeUint32(uint32(m.SwIfIndex))
	buf.EncodeUint8(uint8(m.Local.Af))
	buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
	buf.EncodeUint8(uint8(m.Remote.Af))
	buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
	buf.EncodeUint32(m.Vni)
	buf.EncodeUint8(uint8(m.Protocol))
	buf.EncodeUint32(uint32(m.McastSwIfIndex))
	buf.EncodeUint32(m.EncapVrfID)
	buf.EncodeUint32(m.DecapVrfID)
	buf.EncodeBool(m.IsIPv6)
	return buf.Bytes(), nil
}
func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
	copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
	m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
	copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
	m.Vni = buf.DecodeUint32()
	m.Protocol = ip_types.IPProto(buf.DecodeUint8())
	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	m.EncapVrfID = buf.DecodeUint32()
	m.DecapVrfID = buf.DecodeUint32()
	m.IsIPv6 = buf.DecodeBool()
	return nil
}

// VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'.
type VxlanGpeTunnelDump struct {
	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}

func (m *VxlanGpeTunnelDump) Reset()               { *m = VxlanGpeTunnelDump{} }
func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" }
func (*VxlanGpeTunnelDump) GetCrcString() string   { return "f9e6675e" }
func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
	return api.RequestMessage
}

func (m *VxlanGpeTunnelDump) Size() (size int) {
	if m == nil {
		return 0
	}
	size += 4 // m.SwIfIndex
	return size
}
func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) {
	if b == nil {
		b = make([]byte, m.Size())
	}
	buf := codec.NewBuffer(b)
	buf.EncodeUint32(uint32(m.SwIfIndex))
	return buf.Bytes(), nil
}
func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
	buf := codec.NewBuffer(b)
	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
	return nil
}

func init() { file_vxlan_gpe_binapi_init() }
func file_vxlan_gpe_binapi_init() {
	api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409")
	api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
	api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_a645b2b0")
	api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f")
	api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_0968fc8b")
	api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e")
}

// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
	return []api.Message{
		(*SwInterfaceSetVxlanGpeBypass)(nil),
		(*SwInterfaceSetVxlanGpeBypassReply)(nil),
		(*VxlanGpeAddDelTunnel)(nil),
		(*VxlanGpeAddDelTunnelReply)(nil),
		(*VxlanGpeTunnelDetails)(nil),
		(*VxlanGpeTunnelDump)(nil),
	}
}