1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/gtpu.api.json
7 // Package gtpu contains generated bindings for API file gtpu.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 ip_types "git.fd.io/govpp.git/binapi/ip_types"
18 codec "git.fd.io/govpp.git/codec"
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
30 VersionCrc = 0x30326e2d
33 // GtpuAddDelTunnel defines message 'gtpu_add_del_tunnel'.
34 type GtpuAddDelTunnel struct {
35 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
36 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
37 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
38 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
39 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
40 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
41 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
44 func (m *GtpuAddDelTunnel) Reset() { *m = GtpuAddDelTunnel{} }
45 func (*GtpuAddDelTunnel) GetMessageName() string { return "gtpu_add_del_tunnel" }
46 func (*GtpuAddDelTunnel) GetCrcString() string { return "9a26a51c" }
47 func (*GtpuAddDelTunnel) GetMessageType() api.MessageType {
48 return api.RequestMessage
51 func (m *GtpuAddDelTunnel) Size() int {
57 size += 1 // m.SrcAddress.Af
58 size += 1 * 16 // m.SrcAddress.Un
59 size += 1 // m.DstAddress.Af
60 size += 1 * 16 // m.DstAddress.Un
61 size += 4 // m.McastSwIfIndex
62 size += 4 // m.EncapVrfID
63 size += 4 // m.DecapNextIndex
67 func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
70 buf = codec.NewBuffer(make([]byte, m.Size()))
72 buf = codec.NewBuffer(b)
74 buf.EncodeBool(m.IsAdd)
75 buf.EncodeUint8(uint8(m.SrcAddress.Af))
76 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 0)
77 buf.EncodeUint8(uint8(m.DstAddress.Af))
78 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 0)
79 buf.EncodeUint32(uint32(m.McastSwIfIndex))
80 buf.EncodeUint32(uint32(m.EncapVrfID))
81 buf.EncodeUint32(uint32(m.DecapNextIndex))
82 buf.EncodeUint32(uint32(m.Teid))
83 return buf.Bytes(), nil
85 func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error {
86 buf := codec.NewBuffer(b)
87 m.IsAdd = buf.DecodeBool()
88 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
89 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
90 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
91 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
92 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
93 m.EncapVrfID = buf.DecodeUint32()
94 m.DecapNextIndex = buf.DecodeUint32()
95 m.Teid = buf.DecodeUint32()
99 // GtpuAddDelTunnelReply defines message 'gtpu_add_del_tunnel_reply'.
100 type GtpuAddDelTunnelReply struct {
101 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
102 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
105 func (m *GtpuAddDelTunnelReply) Reset() { *m = GtpuAddDelTunnelReply{} }
106 func (*GtpuAddDelTunnelReply) GetMessageName() string { return "gtpu_add_del_tunnel_reply" }
107 func (*GtpuAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
108 func (*GtpuAddDelTunnelReply) GetMessageType() api.MessageType {
109 return api.ReplyMessage
112 func (m *GtpuAddDelTunnelReply) Size() int {
117 size += 4 // m.Retval
118 size += 4 // m.SwIfIndex
121 func (m *GtpuAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
122 var buf *codec.Buffer
124 buf = codec.NewBuffer(make([]byte, m.Size()))
126 buf = codec.NewBuffer(b)
128 buf.EncodeUint32(uint32(m.Retval))
129 buf.EncodeUint32(uint32(m.SwIfIndex))
130 return buf.Bytes(), nil
132 func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
133 buf := codec.NewBuffer(b)
134 m.Retval = int32(buf.DecodeUint32())
135 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
139 // GtpuOffloadRx defines message 'gtpu_offload_rx'.
140 type GtpuOffloadRx struct {
141 HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
142 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
143 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
146 func (m *GtpuOffloadRx) Reset() { *m = GtpuOffloadRx{} }
147 func (*GtpuOffloadRx) GetMessageName() string { return "gtpu_offload_rx" }
148 func (*GtpuOffloadRx) GetCrcString() string { return "f0b08786" }
149 func (*GtpuOffloadRx) GetMessageType() api.MessageType {
150 return api.RequestMessage
153 func (m *GtpuOffloadRx) Size() int {
158 size += 4 // m.HwIfIndex
159 size += 4 // m.SwIfIndex
160 size += 1 // m.Enable
163 func (m *GtpuOffloadRx) Marshal(b []byte) ([]byte, error) {
164 var buf *codec.Buffer
166 buf = codec.NewBuffer(make([]byte, m.Size()))
168 buf = codec.NewBuffer(b)
170 buf.EncodeUint32(uint32(m.HwIfIndex))
171 buf.EncodeUint32(uint32(m.SwIfIndex))
172 buf.EncodeUint8(uint8(m.Enable))
173 return buf.Bytes(), nil
175 func (m *GtpuOffloadRx) Unmarshal(b []byte) error {
176 buf := codec.NewBuffer(b)
177 m.HwIfIndex = buf.DecodeUint32()
178 m.SwIfIndex = buf.DecodeUint32()
179 m.Enable = buf.DecodeUint8()
183 // GtpuOffloadRxReply defines message 'gtpu_offload_rx_reply'.
184 type GtpuOffloadRxReply struct {
185 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
188 func (m *GtpuOffloadRxReply) Reset() { *m = GtpuOffloadRxReply{} }
189 func (*GtpuOffloadRxReply) GetMessageName() string { return "gtpu_offload_rx_reply" }
190 func (*GtpuOffloadRxReply) GetCrcString() string { return "e8d4e804" }
191 func (*GtpuOffloadRxReply) GetMessageType() api.MessageType {
192 return api.ReplyMessage
195 func (m *GtpuOffloadRxReply) Size() int {
200 size += 4 // m.Retval
203 func (m *GtpuOffloadRxReply) Marshal(b []byte) ([]byte, error) {
204 var buf *codec.Buffer
206 buf = codec.NewBuffer(make([]byte, m.Size()))
208 buf = codec.NewBuffer(b)
210 buf.EncodeUint32(uint32(m.Retval))
211 return buf.Bytes(), nil
213 func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error {
214 buf := codec.NewBuffer(b)
215 m.Retval = int32(buf.DecodeUint32())
219 // GtpuTunnelDetails defines message 'gtpu_tunnel_details'.
220 type GtpuTunnelDetails struct {
221 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
222 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
223 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
224 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
225 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
226 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
227 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
230 func (m *GtpuTunnelDetails) Reset() { *m = GtpuTunnelDetails{} }
231 func (*GtpuTunnelDetails) GetMessageName() string { return "gtpu_tunnel_details" }
232 func (*GtpuTunnelDetails) GetCrcString() string { return "a4d81a09" }
233 func (*GtpuTunnelDetails) GetMessageType() api.MessageType {
234 return api.ReplyMessage
237 func (m *GtpuTunnelDetails) Size() int {
242 size += 4 // m.SwIfIndex
243 size += 1 // m.SrcAddress.Af
244 size += 1 * 16 // m.SrcAddress.Un
245 size += 1 // m.DstAddress.Af
246 size += 1 * 16 // m.DstAddress.Un
247 size += 4 // m.McastSwIfIndex
248 size += 4 // m.EncapVrfID
249 size += 4 // m.DecapNextIndex
253 func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
254 var buf *codec.Buffer
256 buf = codec.NewBuffer(make([]byte, m.Size()))
258 buf = codec.NewBuffer(b)
260 buf.EncodeUint32(uint32(m.SwIfIndex))
261 buf.EncodeUint8(uint8(m.SrcAddress.Af))
262 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 0)
263 buf.EncodeUint8(uint8(m.DstAddress.Af))
264 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 0)
265 buf.EncodeUint32(uint32(m.McastSwIfIndex))
266 buf.EncodeUint32(uint32(m.EncapVrfID))
267 buf.EncodeUint32(uint32(m.DecapNextIndex))
268 buf.EncodeUint32(uint32(m.Teid))
269 return buf.Bytes(), nil
271 func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
272 buf := codec.NewBuffer(b)
273 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
274 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
275 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
276 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
277 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
278 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
279 m.EncapVrfID = buf.DecodeUint32()
280 m.DecapNextIndex = buf.DecodeUint32()
281 m.Teid = buf.DecodeUint32()
285 // GtpuTunnelDump defines message 'gtpu_tunnel_dump'.
286 type GtpuTunnelDump struct {
287 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
290 func (m *GtpuTunnelDump) Reset() { *m = GtpuTunnelDump{} }
291 func (*GtpuTunnelDump) GetMessageName() string { return "gtpu_tunnel_dump" }
292 func (*GtpuTunnelDump) GetCrcString() string { return "f9e6675e" }
293 func (*GtpuTunnelDump) GetMessageType() api.MessageType {
294 return api.RequestMessage
297 func (m *GtpuTunnelDump) Size() int {
302 size += 4 // m.SwIfIndex
305 func (m *GtpuTunnelDump) Marshal(b []byte) ([]byte, error) {
306 var buf *codec.Buffer
308 buf = codec.NewBuffer(make([]byte, m.Size()))
310 buf = codec.NewBuffer(b)
312 buf.EncodeUint32(uint32(m.SwIfIndex))
313 return buf.Bytes(), nil
315 func (m *GtpuTunnelDump) Unmarshal(b []byte) error {
316 buf := codec.NewBuffer(b)
317 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
321 // SwInterfaceSetGtpuBypass defines message 'sw_interface_set_gtpu_bypass'.
322 type SwInterfaceSetGtpuBypass struct {
323 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
324 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
325 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
328 func (m *SwInterfaceSetGtpuBypass) Reset() { *m = SwInterfaceSetGtpuBypass{} }
329 func (*SwInterfaceSetGtpuBypass) GetMessageName() string { return "sw_interface_set_gtpu_bypass" }
330 func (*SwInterfaceSetGtpuBypass) GetCrcString() string { return "65247409" }
331 func (*SwInterfaceSetGtpuBypass) GetMessageType() api.MessageType {
332 return api.RequestMessage
335 func (m *SwInterfaceSetGtpuBypass) Size() int {
340 size += 4 // m.SwIfIndex
341 size += 1 // m.IsIPv6
342 size += 1 // m.Enable
345 func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
346 var buf *codec.Buffer
348 buf = codec.NewBuffer(make([]byte, m.Size()))
350 buf = codec.NewBuffer(b)
352 buf.EncodeUint32(uint32(m.SwIfIndex))
353 buf.EncodeBool(m.IsIPv6)
354 buf.EncodeBool(m.Enable)
355 return buf.Bytes(), nil
357 func (m *SwInterfaceSetGtpuBypass) Unmarshal(b []byte) error {
358 buf := codec.NewBuffer(b)
359 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
360 m.IsIPv6 = buf.DecodeBool()
361 m.Enable = buf.DecodeBool()
365 // SwInterfaceSetGtpuBypassReply defines message 'sw_interface_set_gtpu_bypass_reply'.
366 type SwInterfaceSetGtpuBypassReply struct {
367 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
370 func (m *SwInterfaceSetGtpuBypassReply) Reset() { *m = SwInterfaceSetGtpuBypassReply{} }
371 func (*SwInterfaceSetGtpuBypassReply) GetMessageName() string {
372 return "sw_interface_set_gtpu_bypass_reply"
374 func (*SwInterfaceSetGtpuBypassReply) GetCrcString() string { return "e8d4e804" }
375 func (*SwInterfaceSetGtpuBypassReply) GetMessageType() api.MessageType {
376 return api.ReplyMessage
379 func (m *SwInterfaceSetGtpuBypassReply) Size() int {
384 size += 4 // m.Retval
387 func (m *SwInterfaceSetGtpuBypassReply) Marshal(b []byte) ([]byte, error) {
388 var buf *codec.Buffer
390 buf = codec.NewBuffer(make([]byte, m.Size()))
392 buf = codec.NewBuffer(b)
394 buf.EncodeUint32(uint32(m.Retval))
395 return buf.Bytes(), nil
397 func (m *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
398 buf := codec.NewBuffer(b)
399 m.Retval = int32(buf.DecodeUint32())
403 func init() { file_gtpu_binapi_init() }
404 func file_gtpu_binapi_init() {
405 api.RegisterMessage((*GtpuAddDelTunnel)(nil), "gtpu_add_del_tunnel_9a26a51c")
406 api.RegisterMessage((*GtpuAddDelTunnelReply)(nil), "gtpu_add_del_tunnel_reply_5383d31f")
407 api.RegisterMessage((*GtpuOffloadRx)(nil), "gtpu_offload_rx_f0b08786")
408 api.RegisterMessage((*GtpuOffloadRxReply)(nil), "gtpu_offload_rx_reply_e8d4e804")
409 api.RegisterMessage((*GtpuTunnelDetails)(nil), "gtpu_tunnel_details_a4d81a09")
410 api.RegisterMessage((*GtpuTunnelDump)(nil), "gtpu_tunnel_dump_f9e6675e")
411 api.RegisterMessage((*SwInterfaceSetGtpuBypass)(nil), "sw_interface_set_gtpu_bypass_65247409")
412 api.RegisterMessage((*SwInterfaceSetGtpuBypassReply)(nil), "sw_interface_set_gtpu_bypass_reply_e8d4e804")
415 // Messages returns list of all messages in this module.
416 func AllMessages() []api.Message {
417 return []api.Message{
418 (*GtpuAddDelTunnel)(nil),
419 (*GtpuAddDelTunnelReply)(nil),
420 (*GtpuOffloadRx)(nil),
421 (*GtpuOffloadRxReply)(nil),
422 (*GtpuTunnelDetails)(nil),
423 (*GtpuTunnelDump)(nil),
424 (*SwInterfaceSetGtpuBypass)(nil),
425 (*SwInterfaceSetGtpuBypassReply)(nil),