1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package gtpu contains generated bindings for API file gtpu.api.
14 api "git.fd.io/govpp.git/api"
15 interface_types "git.fd.io/govpp.git/binapi/interface_types"
16 ip_types "git.fd.io/govpp.git/binapi/ip_types"
17 codec "git.fd.io/govpp.git/codec"
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
29 VersionCrc = 0x30326e2d
32 // GtpuAddDelTunnel defines message 'gtpu_add_del_tunnel'.
33 type GtpuAddDelTunnel struct {
34 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
35 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
36 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
37 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
38 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
39 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
40 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
43 func (m *GtpuAddDelTunnel) Reset() { *m = GtpuAddDelTunnel{} }
44 func (*GtpuAddDelTunnel) GetMessageName() string { return "gtpu_add_del_tunnel" }
45 func (*GtpuAddDelTunnel) GetCrcString() string { return "9a26a51c" }
46 func (*GtpuAddDelTunnel) GetMessageType() api.MessageType {
47 return api.RequestMessage
50 func (m *GtpuAddDelTunnel) Size() (size int) {
55 size += 1 // m.SrcAddress.Af
56 size += 1 * 16 // m.SrcAddress.Un
57 size += 1 // m.DstAddress.Af
58 size += 1 * 16 // m.DstAddress.Un
59 size += 4 // m.McastSwIfIndex
60 size += 4 // m.EncapVrfID
61 size += 4 // m.DecapNextIndex
65 func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
67 b = make([]byte, m.Size())
69 buf := codec.NewBuffer(b)
70 buf.EncodeBool(m.IsAdd)
71 buf.EncodeUint8(uint8(m.SrcAddress.Af))
72 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
73 buf.EncodeUint8(uint8(m.DstAddress.Af))
74 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
75 buf.EncodeUint32(uint32(m.McastSwIfIndex))
76 buf.EncodeUint32(m.EncapVrfID)
77 buf.EncodeUint32(m.DecapNextIndex)
78 buf.EncodeUint32(m.Teid)
79 return buf.Bytes(), nil
81 func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error {
82 buf := codec.NewBuffer(b)
83 m.IsAdd = buf.DecodeBool()
84 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
85 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
86 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
87 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
88 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
89 m.EncapVrfID = buf.DecodeUint32()
90 m.DecapNextIndex = buf.DecodeUint32()
91 m.Teid = buf.DecodeUint32()
95 // GtpuAddDelTunnelReply defines message 'gtpu_add_del_tunnel_reply'.
96 type GtpuAddDelTunnelReply struct {
97 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
98 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
101 func (m *GtpuAddDelTunnelReply) Reset() { *m = GtpuAddDelTunnelReply{} }
102 func (*GtpuAddDelTunnelReply) GetMessageName() string { return "gtpu_add_del_tunnel_reply" }
103 func (*GtpuAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
104 func (*GtpuAddDelTunnelReply) GetMessageType() api.MessageType {
105 return api.ReplyMessage
108 func (m *GtpuAddDelTunnelReply) Size() (size int) {
112 size += 4 // m.Retval
113 size += 4 // m.SwIfIndex
116 func (m *GtpuAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
118 b = make([]byte, m.Size())
120 buf := codec.NewBuffer(b)
121 buf.EncodeInt32(m.Retval)
122 buf.EncodeUint32(uint32(m.SwIfIndex))
123 return buf.Bytes(), nil
125 func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
126 buf := codec.NewBuffer(b)
127 m.Retval = buf.DecodeInt32()
128 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
132 // GtpuOffloadRx defines message 'gtpu_offload_rx'.
133 type GtpuOffloadRx struct {
134 HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
135 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
136 Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
139 func (m *GtpuOffloadRx) Reset() { *m = GtpuOffloadRx{} }
140 func (*GtpuOffloadRx) GetMessageName() string { return "gtpu_offload_rx" }
141 func (*GtpuOffloadRx) GetCrcString() string { return "f0b08786" }
142 func (*GtpuOffloadRx) GetMessageType() api.MessageType {
143 return api.RequestMessage
146 func (m *GtpuOffloadRx) Size() (size int) {
150 size += 4 // m.HwIfIndex
151 size += 4 // m.SwIfIndex
152 size += 1 // m.Enable
155 func (m *GtpuOffloadRx) Marshal(b []byte) ([]byte, error) {
157 b = make([]byte, m.Size())
159 buf := codec.NewBuffer(b)
160 buf.EncodeUint32(m.HwIfIndex)
161 buf.EncodeUint32(m.SwIfIndex)
162 buf.EncodeUint8(m.Enable)
163 return buf.Bytes(), nil
165 func (m *GtpuOffloadRx) Unmarshal(b []byte) error {
166 buf := codec.NewBuffer(b)
167 m.HwIfIndex = buf.DecodeUint32()
168 m.SwIfIndex = buf.DecodeUint32()
169 m.Enable = buf.DecodeUint8()
173 // GtpuOffloadRxReply defines message 'gtpu_offload_rx_reply'.
174 type GtpuOffloadRxReply struct {
175 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
178 func (m *GtpuOffloadRxReply) Reset() { *m = GtpuOffloadRxReply{} }
179 func (*GtpuOffloadRxReply) GetMessageName() string { return "gtpu_offload_rx_reply" }
180 func (*GtpuOffloadRxReply) GetCrcString() string { return "e8d4e804" }
181 func (*GtpuOffloadRxReply) GetMessageType() api.MessageType {
182 return api.ReplyMessage
185 func (m *GtpuOffloadRxReply) Size() (size int) {
189 size += 4 // m.Retval
192 func (m *GtpuOffloadRxReply) Marshal(b []byte) ([]byte, error) {
194 b = make([]byte, m.Size())
196 buf := codec.NewBuffer(b)
197 buf.EncodeInt32(m.Retval)
198 return buf.Bytes(), nil
200 func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error {
201 buf := codec.NewBuffer(b)
202 m.Retval = buf.DecodeInt32()
206 // GtpuTunnelDetails defines message 'gtpu_tunnel_details'.
207 type GtpuTunnelDetails struct {
208 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
209 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
210 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
211 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
212 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
213 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
214 Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
217 func (m *GtpuTunnelDetails) Reset() { *m = GtpuTunnelDetails{} }
218 func (*GtpuTunnelDetails) GetMessageName() string { return "gtpu_tunnel_details" }
219 func (*GtpuTunnelDetails) GetCrcString() string { return "a4d81a09" }
220 func (*GtpuTunnelDetails) GetMessageType() api.MessageType {
221 return api.ReplyMessage
224 func (m *GtpuTunnelDetails) Size() (size int) {
228 size += 4 // m.SwIfIndex
229 size += 1 // m.SrcAddress.Af
230 size += 1 * 16 // m.SrcAddress.Un
231 size += 1 // m.DstAddress.Af
232 size += 1 * 16 // m.DstAddress.Un
233 size += 4 // m.McastSwIfIndex
234 size += 4 // m.EncapVrfID
235 size += 4 // m.DecapNextIndex
239 func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
241 b = make([]byte, m.Size())
243 buf := codec.NewBuffer(b)
244 buf.EncodeUint32(uint32(m.SwIfIndex))
245 buf.EncodeUint8(uint8(m.SrcAddress.Af))
246 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
247 buf.EncodeUint8(uint8(m.DstAddress.Af))
248 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
249 buf.EncodeUint32(uint32(m.McastSwIfIndex))
250 buf.EncodeUint32(m.EncapVrfID)
251 buf.EncodeUint32(m.DecapNextIndex)
252 buf.EncodeUint32(m.Teid)
253 return buf.Bytes(), nil
255 func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
256 buf := codec.NewBuffer(b)
257 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
258 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
259 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
260 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
261 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
262 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
263 m.EncapVrfID = buf.DecodeUint32()
264 m.DecapNextIndex = buf.DecodeUint32()
265 m.Teid = buf.DecodeUint32()
269 // GtpuTunnelDump defines message 'gtpu_tunnel_dump'.
270 type GtpuTunnelDump struct {
271 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
274 func (m *GtpuTunnelDump) Reset() { *m = GtpuTunnelDump{} }
275 func (*GtpuTunnelDump) GetMessageName() string { return "gtpu_tunnel_dump" }
276 func (*GtpuTunnelDump) GetCrcString() string { return "f9e6675e" }
277 func (*GtpuTunnelDump) GetMessageType() api.MessageType {
278 return api.RequestMessage
281 func (m *GtpuTunnelDump) Size() (size int) {
285 size += 4 // m.SwIfIndex
288 func (m *GtpuTunnelDump) Marshal(b []byte) ([]byte, error) {
290 b = make([]byte, m.Size())
292 buf := codec.NewBuffer(b)
293 buf.EncodeUint32(uint32(m.SwIfIndex))
294 return buf.Bytes(), nil
296 func (m *GtpuTunnelDump) Unmarshal(b []byte) error {
297 buf := codec.NewBuffer(b)
298 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
302 // SwInterfaceSetGtpuBypass defines message 'sw_interface_set_gtpu_bypass'.
303 type SwInterfaceSetGtpuBypass struct {
304 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
305 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
306 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
309 func (m *SwInterfaceSetGtpuBypass) Reset() { *m = SwInterfaceSetGtpuBypass{} }
310 func (*SwInterfaceSetGtpuBypass) GetMessageName() string { return "sw_interface_set_gtpu_bypass" }
311 func (*SwInterfaceSetGtpuBypass) GetCrcString() string { return "65247409" }
312 func (*SwInterfaceSetGtpuBypass) GetMessageType() api.MessageType {
313 return api.RequestMessage
316 func (m *SwInterfaceSetGtpuBypass) Size() (size int) {
320 size += 4 // m.SwIfIndex
321 size += 1 // m.IsIPv6
322 size += 1 // m.Enable
325 func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
327 b = make([]byte, m.Size())
329 buf := codec.NewBuffer(b)
330 buf.EncodeUint32(uint32(m.SwIfIndex))
331 buf.EncodeBool(m.IsIPv6)
332 buf.EncodeBool(m.Enable)
333 return buf.Bytes(), nil
335 func (m *SwInterfaceSetGtpuBypass) Unmarshal(b []byte) error {
336 buf := codec.NewBuffer(b)
337 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
338 m.IsIPv6 = buf.DecodeBool()
339 m.Enable = buf.DecodeBool()
343 // SwInterfaceSetGtpuBypassReply defines message 'sw_interface_set_gtpu_bypass_reply'.
344 type SwInterfaceSetGtpuBypassReply struct {
345 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
348 func (m *SwInterfaceSetGtpuBypassReply) Reset() { *m = SwInterfaceSetGtpuBypassReply{} }
349 func (*SwInterfaceSetGtpuBypassReply) GetMessageName() string {
350 return "sw_interface_set_gtpu_bypass_reply"
352 func (*SwInterfaceSetGtpuBypassReply) GetCrcString() string { return "e8d4e804" }
353 func (*SwInterfaceSetGtpuBypassReply) GetMessageType() api.MessageType {
354 return api.ReplyMessage
357 func (m *SwInterfaceSetGtpuBypassReply) Size() (size int) {
361 size += 4 // m.Retval
364 func (m *SwInterfaceSetGtpuBypassReply) Marshal(b []byte) ([]byte, error) {
366 b = make([]byte, m.Size())
368 buf := codec.NewBuffer(b)
369 buf.EncodeInt32(m.Retval)
370 return buf.Bytes(), nil
372 func (m *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
373 buf := codec.NewBuffer(b)
374 m.Retval = buf.DecodeInt32()
378 func init() { file_gtpu_binapi_init() }
379 func file_gtpu_binapi_init() {
380 api.RegisterMessage((*GtpuAddDelTunnel)(nil), "gtpu_add_del_tunnel_9a26a51c")
381 api.RegisterMessage((*GtpuAddDelTunnelReply)(nil), "gtpu_add_del_tunnel_reply_5383d31f")
382 api.RegisterMessage((*GtpuOffloadRx)(nil), "gtpu_offload_rx_f0b08786")
383 api.RegisterMessage((*GtpuOffloadRxReply)(nil), "gtpu_offload_rx_reply_e8d4e804")
384 api.RegisterMessage((*GtpuTunnelDetails)(nil), "gtpu_tunnel_details_a4d81a09")
385 api.RegisterMessage((*GtpuTunnelDump)(nil), "gtpu_tunnel_dump_f9e6675e")
386 api.RegisterMessage((*SwInterfaceSetGtpuBypass)(nil), "sw_interface_set_gtpu_bypass_65247409")
387 api.RegisterMessage((*SwInterfaceSetGtpuBypassReply)(nil), "sw_interface_set_gtpu_bypass_reply_e8d4e804")
390 // Messages returns list of all messages in this module.
391 func AllMessages() []api.Message {
392 return []api.Message{
393 (*GtpuAddDelTunnel)(nil),
394 (*GtpuAddDelTunnelReply)(nil),
395 (*GtpuOffloadRx)(nil),
396 (*GtpuOffloadRxReply)(nil),
397 (*GtpuTunnelDetails)(nil),
398 (*GtpuTunnelDump)(nil),
399 (*SwInterfaceSetGtpuBypass)(nil),
400 (*SwInterfaceSetGtpuBypassReply)(nil),