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 = 0x1462473
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"`
42 Tteid uint32 `binapi:"u32,name=tteid" json:"tteid,omitempty"`
45 func (m *GtpuAddDelTunnel) Reset() { *m = GtpuAddDelTunnel{} }
46 func (*GtpuAddDelTunnel) GetMessageName() string { return "gtpu_add_del_tunnel" }
47 func (*GtpuAddDelTunnel) GetCrcString() string { return "ca983a2b" }
48 func (*GtpuAddDelTunnel) GetMessageType() api.MessageType {
49 return api.RequestMessage
52 func (m *GtpuAddDelTunnel) Size() (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
68 func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
70 b = make([]byte, m.Size())
72 buf := codec.NewBuffer(b)
73 buf.EncodeBool(m.IsAdd)
74 buf.EncodeUint8(uint8(m.SrcAddress.Af))
75 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
76 buf.EncodeUint8(uint8(m.DstAddress.Af))
77 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
78 buf.EncodeUint32(uint32(m.McastSwIfIndex))
79 buf.EncodeUint32(m.EncapVrfID)
80 buf.EncodeUint32(m.DecapNextIndex)
81 buf.EncodeUint32(m.Teid)
82 buf.EncodeUint32(m.Tteid)
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()
96 m.Tteid = buf.DecodeUint32()
100 // GtpuAddDelTunnelReply defines message 'gtpu_add_del_tunnel_reply'.
101 type GtpuAddDelTunnelReply struct {
102 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
103 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
106 func (m *GtpuAddDelTunnelReply) Reset() { *m = GtpuAddDelTunnelReply{} }
107 func (*GtpuAddDelTunnelReply) GetMessageName() string { return "gtpu_add_del_tunnel_reply" }
108 func (*GtpuAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
109 func (*GtpuAddDelTunnelReply) GetMessageType() api.MessageType {
110 return api.ReplyMessage
113 func (m *GtpuAddDelTunnelReply) Size() (size int) {
117 size += 4 // m.Retval
118 size += 4 // m.SwIfIndex
121 func (m *GtpuAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
123 b = make([]byte, m.Size())
125 buf := codec.NewBuffer(b)
126 buf.EncodeInt32(m.Retval)
127 buf.EncodeUint32(uint32(m.SwIfIndex))
128 return buf.Bytes(), nil
130 func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
131 buf := codec.NewBuffer(b)
132 m.Retval = buf.DecodeInt32()
133 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
137 // GtpuOffloadRx defines message 'gtpu_offload_rx'.
138 type GtpuOffloadRx struct {
139 HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
140 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
141 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
144 func (m *GtpuOffloadRx) Reset() { *m = GtpuOffloadRx{} }
145 func (*GtpuOffloadRx) GetMessageName() string { return "gtpu_offload_rx" }
146 func (*GtpuOffloadRx) GetCrcString() string { return "f0b08786" }
147 func (*GtpuOffloadRx) GetMessageType() api.MessageType {
148 return api.RequestMessage
151 func (m *GtpuOffloadRx) Size() (size int) {
155 size += 4 // m.HwIfIndex
156 size += 4 // m.SwIfIndex
157 size += 1 // m.Enable
160 func (m *GtpuOffloadRx) Marshal(b []byte) ([]byte, error) {
162 b = make([]byte, m.Size())
164 buf := codec.NewBuffer(b)
165 buf.EncodeUint32(m.HwIfIndex)
166 buf.EncodeUint32(m.SwIfIndex)
167 buf.EncodeUint8(m.Enable)
168 return buf.Bytes(), nil
170 func (m *GtpuOffloadRx) Unmarshal(b []byte) error {
171 buf := codec.NewBuffer(b)
172 m.HwIfIndex = buf.DecodeUint32()
173 m.SwIfIndex = buf.DecodeUint32()
174 m.Enable = buf.DecodeUint8()
178 // GtpuOffloadRxReply defines message 'gtpu_offload_rx_reply'.
179 type GtpuOffloadRxReply struct {
180 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
183 func (m *GtpuOffloadRxReply) Reset() { *m = GtpuOffloadRxReply{} }
184 func (*GtpuOffloadRxReply) GetMessageName() string { return "gtpu_offload_rx_reply" }
185 func (*GtpuOffloadRxReply) GetCrcString() string { return "e8d4e804" }
186 func (*GtpuOffloadRxReply) GetMessageType() api.MessageType {
187 return api.ReplyMessage
190 func (m *GtpuOffloadRxReply) Size() (size int) {
194 size += 4 // m.Retval
197 func (m *GtpuOffloadRxReply) Marshal(b []byte) ([]byte, error) {
199 b = make([]byte, m.Size())
201 buf := codec.NewBuffer(b)
202 buf.EncodeInt32(m.Retval)
203 return buf.Bytes(), nil
205 func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error {
206 buf := codec.NewBuffer(b)
207 m.Retval = buf.DecodeInt32()
211 // GtpuTunnelDetails defines message 'gtpu_tunnel_details'.
212 type GtpuTunnelDetails struct {
213 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
214 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
215 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
216 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
217 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
218 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
219 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
220 Tteid uint32 `binapi:"u32,name=tteid" json:"tteid,omitempty"`
223 func (m *GtpuTunnelDetails) Reset() { *m = GtpuTunnelDetails{} }
224 func (*GtpuTunnelDetails) GetMessageName() string { return "gtpu_tunnel_details" }
225 func (*GtpuTunnelDetails) GetCrcString() string { return "27f434ae" }
226 func (*GtpuTunnelDetails) GetMessageType() api.MessageType {
227 return api.ReplyMessage
230 func (m *GtpuTunnelDetails) Size() (size int) {
234 size += 4 // m.SwIfIndex
235 size += 1 // m.SrcAddress.Af
236 size += 1 * 16 // m.SrcAddress.Un
237 size += 1 // m.DstAddress.Af
238 size += 1 * 16 // m.DstAddress.Un
239 size += 4 // m.McastSwIfIndex
240 size += 4 // m.EncapVrfID
241 size += 4 // m.DecapNextIndex
246 func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
248 b = make([]byte, m.Size())
250 buf := codec.NewBuffer(b)
251 buf.EncodeUint32(uint32(m.SwIfIndex))
252 buf.EncodeUint8(uint8(m.SrcAddress.Af))
253 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
254 buf.EncodeUint8(uint8(m.DstAddress.Af))
255 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
256 buf.EncodeUint32(uint32(m.McastSwIfIndex))
257 buf.EncodeUint32(m.EncapVrfID)
258 buf.EncodeUint32(m.DecapNextIndex)
259 buf.EncodeUint32(m.Teid)
260 buf.EncodeUint32(m.Tteid)
261 return buf.Bytes(), nil
263 func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
264 buf := codec.NewBuffer(b)
265 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
266 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
267 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
268 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
269 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
270 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
271 m.EncapVrfID = buf.DecodeUint32()
272 m.DecapNextIndex = buf.DecodeUint32()
273 m.Teid = buf.DecodeUint32()
274 m.Tteid = buf.DecodeUint32()
278 // GtpuTunnelDump defines message 'gtpu_tunnel_dump'.
279 type GtpuTunnelDump struct {
280 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
283 func (m *GtpuTunnelDump) Reset() { *m = GtpuTunnelDump{} }
284 func (*GtpuTunnelDump) GetMessageName() string { return "gtpu_tunnel_dump" }
285 func (*GtpuTunnelDump) GetCrcString() string { return "f9e6675e" }
286 func (*GtpuTunnelDump) GetMessageType() api.MessageType {
287 return api.RequestMessage
290 func (m *GtpuTunnelDump) Size() (size int) {
294 size += 4 // m.SwIfIndex
297 func (m *GtpuTunnelDump) Marshal(b []byte) ([]byte, error) {
299 b = make([]byte, m.Size())
301 buf := codec.NewBuffer(b)
302 buf.EncodeUint32(uint32(m.SwIfIndex))
303 return buf.Bytes(), nil
305 func (m *GtpuTunnelDump) Unmarshal(b []byte) error {
306 buf := codec.NewBuffer(b)
307 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
311 // GtpuTunnelUpdateTteid defines message 'gtpu_tunnel_update_tteid'.
312 type GtpuTunnelUpdateTteid struct {
313 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
314 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
315 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
316 Tteid uint32 `binapi:"u32,name=tteid" json:"tteid,omitempty"`
319 func (m *GtpuTunnelUpdateTteid) Reset() { *m = GtpuTunnelUpdateTteid{} }
320 func (*GtpuTunnelUpdateTteid) GetMessageName() string { return "gtpu_tunnel_update_tteid" }
321 func (*GtpuTunnelUpdateTteid) GetCrcString() string { return "79f33816" }
322 func (*GtpuTunnelUpdateTteid) GetMessageType() api.MessageType {
323 return api.RequestMessage
326 func (m *GtpuTunnelUpdateTteid) Size() (size int) {
330 size += 1 // m.DstAddress.Af
331 size += 1 * 16 // m.DstAddress.Un
332 size += 4 // m.EncapVrfID
337 func (m *GtpuTunnelUpdateTteid) Marshal(b []byte) ([]byte, error) {
339 b = make([]byte, m.Size())
341 buf := codec.NewBuffer(b)
342 buf.EncodeUint8(uint8(m.DstAddress.Af))
343 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
344 buf.EncodeUint32(m.EncapVrfID)
345 buf.EncodeUint32(m.Teid)
346 buf.EncodeUint32(m.Tteid)
347 return buf.Bytes(), nil
349 func (m *GtpuTunnelUpdateTteid) Unmarshal(b []byte) error {
350 buf := codec.NewBuffer(b)
351 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
352 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
353 m.EncapVrfID = buf.DecodeUint32()
354 m.Teid = buf.DecodeUint32()
355 m.Tteid = buf.DecodeUint32()
359 // GtpuTunnelUpdateTteidReply defines message 'gtpu_tunnel_update_tteid_reply'.
360 type GtpuTunnelUpdateTteidReply struct {
361 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
364 func (m *GtpuTunnelUpdateTteidReply) Reset() { *m = GtpuTunnelUpdateTteidReply{} }
365 func (*GtpuTunnelUpdateTteidReply) GetMessageName() string { return "gtpu_tunnel_update_tteid_reply" }
366 func (*GtpuTunnelUpdateTteidReply) GetCrcString() string { return "e8d4e804" }
367 func (*GtpuTunnelUpdateTteidReply) GetMessageType() api.MessageType {
368 return api.ReplyMessage
371 func (m *GtpuTunnelUpdateTteidReply) Size() (size int) {
375 size += 4 // m.Retval
378 func (m *GtpuTunnelUpdateTteidReply) Marshal(b []byte) ([]byte, error) {
380 b = make([]byte, m.Size())
382 buf := codec.NewBuffer(b)
383 buf.EncodeInt32(m.Retval)
384 return buf.Bytes(), nil
386 func (m *GtpuTunnelUpdateTteidReply) Unmarshal(b []byte) error {
387 buf := codec.NewBuffer(b)
388 m.Retval = buf.DecodeInt32()
392 // SwInterfaceSetGtpuBypass defines message 'sw_interface_set_gtpu_bypass'.
393 type SwInterfaceSetGtpuBypass struct {
394 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
395 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
396 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
399 func (m *SwInterfaceSetGtpuBypass) Reset() { *m = SwInterfaceSetGtpuBypass{} }
400 func (*SwInterfaceSetGtpuBypass) GetMessageName() string { return "sw_interface_set_gtpu_bypass" }
401 func (*SwInterfaceSetGtpuBypass) GetCrcString() string { return "65247409" }
402 func (*SwInterfaceSetGtpuBypass) GetMessageType() api.MessageType {
403 return api.RequestMessage
406 func (m *SwInterfaceSetGtpuBypass) Size() (size int) {
410 size += 4 // m.SwIfIndex
411 size += 1 // m.IsIPv6
412 size += 1 // m.Enable
415 func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
417 b = make([]byte, m.Size())
419 buf := codec.NewBuffer(b)
420 buf.EncodeUint32(uint32(m.SwIfIndex))
421 buf.EncodeBool(m.IsIPv6)
422 buf.EncodeBool(m.Enable)
423 return buf.Bytes(), nil
425 func (m *SwInterfaceSetGtpuBypass) Unmarshal(b []byte) error {
426 buf := codec.NewBuffer(b)
427 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
428 m.IsIPv6 = buf.DecodeBool()
429 m.Enable = buf.DecodeBool()
433 // SwInterfaceSetGtpuBypassReply defines message 'sw_interface_set_gtpu_bypass_reply'.
434 type SwInterfaceSetGtpuBypassReply struct {
435 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
438 func (m *SwInterfaceSetGtpuBypassReply) Reset() { *m = SwInterfaceSetGtpuBypassReply{} }
439 func (*SwInterfaceSetGtpuBypassReply) GetMessageName() string {
440 return "sw_interface_set_gtpu_bypass_reply"
442 func (*SwInterfaceSetGtpuBypassReply) GetCrcString() string { return "e8d4e804" }
443 func (*SwInterfaceSetGtpuBypassReply) GetMessageType() api.MessageType {
444 return api.ReplyMessage
447 func (m *SwInterfaceSetGtpuBypassReply) Size() (size int) {
451 size += 4 // m.Retval
454 func (m *SwInterfaceSetGtpuBypassReply) Marshal(b []byte) ([]byte, error) {
456 b = make([]byte, m.Size())
458 buf := codec.NewBuffer(b)
459 buf.EncodeInt32(m.Retval)
460 return buf.Bytes(), nil
462 func (m *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
463 buf := codec.NewBuffer(b)
464 m.Retval = buf.DecodeInt32()
468 func init() { file_gtpu_binapi_init() }
469 func file_gtpu_binapi_init() {
470 api.RegisterMessage((*GtpuAddDelTunnel)(nil), "gtpu_add_del_tunnel_ca983a2b")
471 api.RegisterMessage((*GtpuAddDelTunnelReply)(nil), "gtpu_add_del_tunnel_reply_5383d31f")
472 api.RegisterMessage((*GtpuOffloadRx)(nil), "gtpu_offload_rx_f0b08786")
473 api.RegisterMessage((*GtpuOffloadRxReply)(nil), "gtpu_offload_rx_reply_e8d4e804")
474 api.RegisterMessage((*GtpuTunnelDetails)(nil), "gtpu_tunnel_details_27f434ae")
475 api.RegisterMessage((*GtpuTunnelDump)(nil), "gtpu_tunnel_dump_f9e6675e")
476 api.RegisterMessage((*GtpuTunnelUpdateTteid)(nil), "gtpu_tunnel_update_tteid_79f33816")
477 api.RegisterMessage((*GtpuTunnelUpdateTteidReply)(nil), "gtpu_tunnel_update_tteid_reply_e8d4e804")
478 api.RegisterMessage((*SwInterfaceSetGtpuBypass)(nil), "sw_interface_set_gtpu_bypass_65247409")
479 api.RegisterMessage((*SwInterfaceSetGtpuBypassReply)(nil), "sw_interface_set_gtpu_bypass_reply_e8d4e804")
482 // Messages returns list of all messages in this module.
483 func AllMessages() []api.Message {
484 return []api.Message{
485 (*GtpuAddDelTunnel)(nil),
486 (*GtpuAddDelTunnelReply)(nil),
487 (*GtpuOffloadRx)(nil),
488 (*GtpuOffloadRxReply)(nil),
489 (*GtpuTunnelDetails)(nil),
490 (*GtpuTunnelDump)(nil),
491 (*GtpuTunnelUpdateTteid)(nil),
492 (*GtpuTunnelUpdateTteidReply)(nil),
493 (*SwInterfaceSetGtpuBypass)(nil),
494 (*SwInterfaceSetGtpuBypassReply)(nil),