1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
4 // VPP: 20.05.1-release
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() (size int) {
56 size += 1 // m.SrcAddress.Af
57 size += 1 * 16 // m.SrcAddress.Un
58 size += 1 // m.DstAddress.Af
59 size += 1 * 16 // m.DstAddress.Un
60 size += 4 // m.McastSwIfIndex
61 size += 4 // m.EncapVrfID
62 size += 4 // m.DecapNextIndex
66 func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
68 b = make([]byte, m.Size())
70 buf := codec.NewBuffer(b)
71 buf.EncodeBool(m.IsAdd)
72 buf.EncodeUint8(uint8(m.SrcAddress.Af))
73 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
74 buf.EncodeUint8(uint8(m.DstAddress.Af))
75 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
76 buf.EncodeUint32(uint32(m.McastSwIfIndex))
77 buf.EncodeUint32(m.EncapVrfID)
78 buf.EncodeUint32(m.DecapNextIndex)
79 buf.EncodeUint32(m.Teid)
80 return buf.Bytes(), nil
82 func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error {
83 buf := codec.NewBuffer(b)
84 m.IsAdd = buf.DecodeBool()
85 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
86 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
87 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
88 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
89 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
90 m.EncapVrfID = buf.DecodeUint32()
91 m.DecapNextIndex = buf.DecodeUint32()
92 m.Teid = buf.DecodeUint32()
96 // GtpuAddDelTunnelReply defines message 'gtpu_add_del_tunnel_reply'.
97 type GtpuAddDelTunnelReply struct {
98 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
99 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
102 func (m *GtpuAddDelTunnelReply) Reset() { *m = GtpuAddDelTunnelReply{} }
103 func (*GtpuAddDelTunnelReply) GetMessageName() string { return "gtpu_add_del_tunnel_reply" }
104 func (*GtpuAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
105 func (*GtpuAddDelTunnelReply) GetMessageType() api.MessageType {
106 return api.ReplyMessage
109 func (m *GtpuAddDelTunnelReply) Size() (size int) {
113 size += 4 // m.Retval
114 size += 4 // m.SwIfIndex
117 func (m *GtpuAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
119 b = make([]byte, m.Size())
121 buf := codec.NewBuffer(b)
122 buf.EncodeInt32(m.Retval)
123 buf.EncodeUint32(uint32(m.SwIfIndex))
124 return buf.Bytes(), nil
126 func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
127 buf := codec.NewBuffer(b)
128 m.Retval = buf.DecodeInt32()
129 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
133 // GtpuOffloadRx defines message 'gtpu_offload_rx'.
134 type GtpuOffloadRx struct {
135 HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
136 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
137 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
140 func (m *GtpuOffloadRx) Reset() { *m = GtpuOffloadRx{} }
141 func (*GtpuOffloadRx) GetMessageName() string { return "gtpu_offload_rx" }
142 func (*GtpuOffloadRx) GetCrcString() string { return "f0b08786" }
143 func (*GtpuOffloadRx) GetMessageType() api.MessageType {
144 return api.RequestMessage
147 func (m *GtpuOffloadRx) Size() (size int) {
151 size += 4 // m.HwIfIndex
152 size += 4 // m.SwIfIndex
153 size += 1 // m.Enable
156 func (m *GtpuOffloadRx) Marshal(b []byte) ([]byte, error) {
158 b = make([]byte, m.Size())
160 buf := codec.NewBuffer(b)
161 buf.EncodeUint32(m.HwIfIndex)
162 buf.EncodeUint32(m.SwIfIndex)
163 buf.EncodeUint8(m.Enable)
164 return buf.Bytes(), nil
166 func (m *GtpuOffloadRx) Unmarshal(b []byte) error {
167 buf := codec.NewBuffer(b)
168 m.HwIfIndex = buf.DecodeUint32()
169 m.SwIfIndex = buf.DecodeUint32()
170 m.Enable = buf.DecodeUint8()
174 // GtpuOffloadRxReply defines message 'gtpu_offload_rx_reply'.
175 type GtpuOffloadRxReply struct {
176 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
179 func (m *GtpuOffloadRxReply) Reset() { *m = GtpuOffloadRxReply{} }
180 func (*GtpuOffloadRxReply) GetMessageName() string { return "gtpu_offload_rx_reply" }
181 func (*GtpuOffloadRxReply) GetCrcString() string { return "e8d4e804" }
182 func (*GtpuOffloadRxReply) GetMessageType() api.MessageType {
183 return api.ReplyMessage
186 func (m *GtpuOffloadRxReply) Size() (size int) {
190 size += 4 // m.Retval
193 func (m *GtpuOffloadRxReply) Marshal(b []byte) ([]byte, error) {
195 b = make([]byte, m.Size())
197 buf := codec.NewBuffer(b)
198 buf.EncodeInt32(m.Retval)
199 return buf.Bytes(), nil
201 func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error {
202 buf := codec.NewBuffer(b)
203 m.Retval = buf.DecodeInt32()
207 // GtpuTunnelDetails defines message 'gtpu_tunnel_details'.
208 type GtpuTunnelDetails struct {
209 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
210 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
211 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
212 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
213 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
214 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
215 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
218 func (m *GtpuTunnelDetails) Reset() { *m = GtpuTunnelDetails{} }
219 func (*GtpuTunnelDetails) GetMessageName() string { return "gtpu_tunnel_details" }
220 func (*GtpuTunnelDetails) GetCrcString() string { return "a4d81a09" }
221 func (*GtpuTunnelDetails) GetMessageType() api.MessageType {
222 return api.ReplyMessage
225 func (m *GtpuTunnelDetails) Size() (size int) {
229 size += 4 // m.SwIfIndex
230 size += 1 // m.SrcAddress.Af
231 size += 1 * 16 // m.SrcAddress.Un
232 size += 1 // m.DstAddress.Af
233 size += 1 * 16 // m.DstAddress.Un
234 size += 4 // m.McastSwIfIndex
235 size += 4 // m.EncapVrfID
236 size += 4 // m.DecapNextIndex
240 func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
242 b = make([]byte, m.Size())
244 buf := codec.NewBuffer(b)
245 buf.EncodeUint32(uint32(m.SwIfIndex))
246 buf.EncodeUint8(uint8(m.SrcAddress.Af))
247 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
248 buf.EncodeUint8(uint8(m.DstAddress.Af))
249 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
250 buf.EncodeUint32(uint32(m.McastSwIfIndex))
251 buf.EncodeUint32(m.EncapVrfID)
252 buf.EncodeUint32(m.DecapNextIndex)
253 buf.EncodeUint32(m.Teid)
254 return buf.Bytes(), nil
256 func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
257 buf := codec.NewBuffer(b)
258 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
259 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
260 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
261 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
262 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
263 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
264 m.EncapVrfID = buf.DecodeUint32()
265 m.DecapNextIndex = buf.DecodeUint32()
266 m.Teid = buf.DecodeUint32()
270 // GtpuTunnelDump defines message 'gtpu_tunnel_dump'.
271 type GtpuTunnelDump struct {
272 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
275 func (m *GtpuTunnelDump) Reset() { *m = GtpuTunnelDump{} }
276 func (*GtpuTunnelDump) GetMessageName() string { return "gtpu_tunnel_dump" }
277 func (*GtpuTunnelDump) GetCrcString() string { return "f9e6675e" }
278 func (*GtpuTunnelDump) GetMessageType() api.MessageType {
279 return api.RequestMessage
282 func (m *GtpuTunnelDump) Size() (size int) {
286 size += 4 // m.SwIfIndex
289 func (m *GtpuTunnelDump) Marshal(b []byte) ([]byte, error) {
291 b = make([]byte, m.Size())
293 buf := codec.NewBuffer(b)
294 buf.EncodeUint32(uint32(m.SwIfIndex))
295 return buf.Bytes(), nil
297 func (m *GtpuTunnelDump) Unmarshal(b []byte) error {
298 buf := codec.NewBuffer(b)
299 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
303 // SwInterfaceSetGtpuBypass defines message 'sw_interface_set_gtpu_bypass'.
304 type SwInterfaceSetGtpuBypass struct {
305 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
306 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
307 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
310 func (m *SwInterfaceSetGtpuBypass) Reset() { *m = SwInterfaceSetGtpuBypass{} }
311 func (*SwInterfaceSetGtpuBypass) GetMessageName() string { return "sw_interface_set_gtpu_bypass" }
312 func (*SwInterfaceSetGtpuBypass) GetCrcString() string { return "65247409" }
313 func (*SwInterfaceSetGtpuBypass) GetMessageType() api.MessageType {
314 return api.RequestMessage
317 func (m *SwInterfaceSetGtpuBypass) Size() (size int) {
321 size += 4 // m.SwIfIndex
322 size += 1 // m.IsIPv6
323 size += 1 // m.Enable
326 func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
328 b = make([]byte, m.Size())
330 buf := codec.NewBuffer(b)
331 buf.EncodeUint32(uint32(m.SwIfIndex))
332 buf.EncodeBool(m.IsIPv6)
333 buf.EncodeBool(m.Enable)
334 return buf.Bytes(), nil
336 func (m *SwInterfaceSetGtpuBypass) Unmarshal(b []byte) error {
337 buf := codec.NewBuffer(b)
338 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
339 m.IsIPv6 = buf.DecodeBool()
340 m.Enable = buf.DecodeBool()
344 // SwInterfaceSetGtpuBypassReply defines message 'sw_interface_set_gtpu_bypass_reply'.
345 type SwInterfaceSetGtpuBypassReply struct {
346 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
349 func (m *SwInterfaceSetGtpuBypassReply) Reset() { *m = SwInterfaceSetGtpuBypassReply{} }
350 func (*SwInterfaceSetGtpuBypassReply) GetMessageName() string {
351 return "sw_interface_set_gtpu_bypass_reply"
353 func (*SwInterfaceSetGtpuBypassReply) GetCrcString() string { return "e8d4e804" }
354 func (*SwInterfaceSetGtpuBypassReply) GetMessageType() api.MessageType {
355 return api.ReplyMessage
358 func (m *SwInterfaceSetGtpuBypassReply) Size() (size int) {
362 size += 4 // m.Retval
365 func (m *SwInterfaceSetGtpuBypassReply) Marshal(b []byte) ([]byte, error) {
367 b = make([]byte, m.Size())
369 buf := codec.NewBuffer(b)
370 buf.EncodeInt32(m.Retval)
371 return buf.Bytes(), nil
373 func (m *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
374 buf := codec.NewBuffer(b)
375 m.Retval = buf.DecodeInt32()
379 func init() { file_gtpu_binapi_init() }
380 func file_gtpu_binapi_init() {
381 api.RegisterMessage((*GtpuAddDelTunnel)(nil), "gtpu_add_del_tunnel_9a26a51c")
382 api.RegisterMessage((*GtpuAddDelTunnelReply)(nil), "gtpu_add_del_tunnel_reply_5383d31f")
383 api.RegisterMessage((*GtpuOffloadRx)(nil), "gtpu_offload_rx_f0b08786")
384 api.RegisterMessage((*GtpuOffloadRxReply)(nil), "gtpu_offload_rx_reply_e8d4e804")
385 api.RegisterMessage((*GtpuTunnelDetails)(nil), "gtpu_tunnel_details_a4d81a09")
386 api.RegisterMessage((*GtpuTunnelDump)(nil), "gtpu_tunnel_dump_f9e6675e")
387 api.RegisterMessage((*SwInterfaceSetGtpuBypass)(nil), "sw_interface_set_gtpu_bypass_65247409")
388 api.RegisterMessage((*SwInterfaceSetGtpuBypassReply)(nil), "sw_interface_set_gtpu_bypass_reply_e8d4e804")
391 // Messages returns list of all messages in this module.
392 func AllMessages() []api.Message {
393 return []api.Message{
394 (*GtpuAddDelTunnel)(nil),
395 (*GtpuAddDelTunnelReply)(nil),
396 (*GtpuOffloadRx)(nil),
397 (*GtpuOffloadRxReply)(nil),
398 (*GtpuTunnelDetails)(nil),
399 (*GtpuTunnelDump)(nil),
400 (*SwInterfaceSetGtpuBypass)(nil),
401 (*SwInterfaceSetGtpuBypassReply)(nil),