Fix union data size for types with enums
[govpp.git] / examples / bin_api / memclnt / memclnt.ba.go
1 // Code generated by GoVPP binapi-generator. DO NOT EDIT.
2 //  source: memclnt.api.json
3
4 /*
5  Package memclnt is a generated from VPP binary API module 'memclnt'.
6
7  It contains following objects:
8          13 services
9           2 types
10          22 messages
11 */
12 package memclnt
13
14 import api "git.fd.io/govpp.git/api"
15 import struc "github.com/lunixbochs/struc"
16 import bytes "bytes"
17
18 // Reference imports to suppress errors if they are not otherwise used.
19 var _ = api.RegisterMessage
20 var _ = struc.Pack
21 var _ = bytes.NewBuffer
22
23 // Services represents VPP binary API services:
24 type Services interface {
25         APIVersions(*APIVersions) (*APIVersionsReply, error)
26         GetFirstMsgID(*GetFirstMsgID) (*GetFirstMsgIDReply, error)
27         MemclntCreate(*MemclntCreate) (*MemclntCreateReply, error)
28         MemclntDelete(*MemclntDelete) (*MemclntDeleteReply, error)
29         MemclntKeepalive(*MemclntKeepalive) (*MemclntKeepaliveReply, error)
30         MemclntReadTimeout(*MemclntReadTimeout) error
31         MemclntRxThreadSuspend(*MemclntRxThreadSuspend) error
32         RPCCall(*RPCCall) (*RPCCallReply, error)
33         RxThreadExit(*RxThreadExit) error
34         SockInitShm(*SockInitShm) (*SockInitShmReply, error)
35         SockclntCreate(*SockclntCreate) (*SockclntCreateReply, error)
36         SockclntDelete(*SockclntDelete) (*SockclntDeleteReply, error)
37         TracePluginMsgIds(*TracePluginMsgIds) error
38 }
39
40 /* Types */
41
42 // MessageTableEntry represents VPP binary API type 'message_table_entry':
43 type MessageTableEntry struct {
44         Index uint16
45         Name  []byte `struc:"[64]byte"`
46 }
47
48 func (*MessageTableEntry) GetTypeName() string {
49         return "message_table_entry"
50 }
51 func (*MessageTableEntry) GetCrcString() string {
52         return "913bf1c6"
53 }
54
55 // ModuleVersion represents VPP binary API type 'module_version':
56 type ModuleVersion struct {
57         Major uint32
58         Minor uint32
59         Patch uint32
60         Name  []byte `struc:"[64]byte"`
61 }
62
63 func (*ModuleVersion) GetTypeName() string {
64         return "module_version"
65 }
66 func (*ModuleVersion) GetCrcString() string {
67         return "4b6da11a"
68 }
69
70 /* Messages */
71
72 // APIVersions represents VPP binary API message 'api_versions':
73 type APIVersions struct{}
74
75 func (*APIVersions) GetMessageName() string {
76         return "api_versions"
77 }
78 func (*APIVersions) GetCrcString() string {
79         return "51077d14"
80 }
81 func (*APIVersions) GetMessageType() api.MessageType {
82         return api.RequestMessage
83 }
84
85 // APIVersionsReply represents VPP binary API message 'api_versions_reply':
86 type APIVersionsReply struct {
87         Retval      int32
88         Count       uint32 `struc:"sizeof=APIVersions"`
89         APIVersions []ModuleVersion
90 }
91
92 func (*APIVersionsReply) GetMessageName() string {
93         return "api_versions_reply"
94 }
95 func (*APIVersionsReply) GetCrcString() string {
96         return "90a39195"
97 }
98 func (*APIVersionsReply) GetMessageType() api.MessageType {
99         return api.ReplyMessage
100 }
101
102 // GetFirstMsgID represents VPP binary API message 'get_first_msg_id':
103 type GetFirstMsgID struct {
104         Name []byte `struc:"[64]byte"`
105 }
106
107 func (*GetFirstMsgID) GetMessageName() string {
108         return "get_first_msg_id"
109 }
110 func (*GetFirstMsgID) GetCrcString() string {
111         return "0cb71b0e"
112 }
113 func (*GetFirstMsgID) GetMessageType() api.MessageType {
114         return api.RequestMessage
115 }
116
117 // GetFirstMsgIDReply represents VPP binary API message 'get_first_msg_id_reply':
118 type GetFirstMsgIDReply struct {
119         Retval     int32
120         FirstMsgID uint16
121 }
122
123 func (*GetFirstMsgIDReply) GetMessageName() string {
124         return "get_first_msg_id_reply"
125 }
126 func (*GetFirstMsgIDReply) GetCrcString() string {
127         return "7d337472"
128 }
129 func (*GetFirstMsgIDReply) GetMessageType() api.MessageType {
130         return api.ReplyMessage
131 }
132
133 // MemclntCreate represents VPP binary API message 'memclnt_create':
134 type MemclntCreate struct {
135         CtxQuota    int32
136         InputQueue  uint64
137         Name        []byte   `struc:"[64]byte"`
138         APIVersions []uint32 `struc:"[8]uint32"`
139 }
140
141 func (*MemclntCreate) GetMessageName() string {
142         return "memclnt_create"
143 }
144 func (*MemclntCreate) GetCrcString() string {
145         return "6d33c5ea"
146 }
147 func (*MemclntCreate) GetMessageType() api.MessageType {
148         return api.ReplyMessage
149 }
150
151 // MemclntCreateReply represents VPP binary API message 'memclnt_create_reply':
152 type MemclntCreateReply struct {
153         Response     int32
154         Handle       uint64
155         Index        uint32
156         MessageTable uint64
157 }
158
159 func (*MemclntCreateReply) GetMessageName() string {
160         return "memclnt_create_reply"
161 }
162 func (*MemclntCreateReply) GetCrcString() string {
163         return "42ec4560"
164 }
165 func (*MemclntCreateReply) GetMessageType() api.MessageType {
166         return api.ReplyMessage
167 }
168
169 // MemclntDelete represents VPP binary API message 'memclnt_delete':
170 type MemclntDelete struct {
171         Index     uint32
172         Handle    uint64
173         DoCleanup uint8
174 }
175
176 func (*MemclntDelete) GetMessageName() string {
177         return "memclnt_delete"
178 }
179 func (*MemclntDelete) GetCrcString() string {
180         return "4dd351e9"
181 }
182 func (*MemclntDelete) GetMessageType() api.MessageType {
183         return api.OtherMessage
184 }
185
186 // MemclntDeleteReply represents VPP binary API message 'memclnt_delete_reply':
187 type MemclntDeleteReply struct {
188         Response int32
189         Handle   uint64
190 }
191
192 func (*MemclntDeleteReply) GetMessageName() string {
193         return "memclnt_delete_reply"
194 }
195 func (*MemclntDeleteReply) GetCrcString() string {
196         return "3d3b6312"
197 }
198 func (*MemclntDeleteReply) GetMessageType() api.MessageType {
199         return api.OtherMessage
200 }
201
202 // MemclntKeepalive represents VPP binary API message 'memclnt_keepalive':
203 type MemclntKeepalive struct{}
204
205 func (*MemclntKeepalive) GetMessageName() string {
206         return "memclnt_keepalive"
207 }
208 func (*MemclntKeepalive) GetCrcString() string {
209         return "51077d14"
210 }
211 func (*MemclntKeepalive) GetMessageType() api.MessageType {
212         return api.RequestMessage
213 }
214
215 // MemclntKeepaliveReply represents VPP binary API message 'memclnt_keepalive_reply':
216 type MemclntKeepaliveReply struct {
217         Retval int32
218 }
219
220 func (*MemclntKeepaliveReply) GetMessageName() string {
221         return "memclnt_keepalive_reply"
222 }
223 func (*MemclntKeepaliveReply) GetCrcString() string {
224         return "e8d4e804"
225 }
226 func (*MemclntKeepaliveReply) GetMessageType() api.MessageType {
227         return api.ReplyMessage
228 }
229
230 // MemclntReadTimeout represents VPP binary API message 'memclnt_read_timeout':
231 type MemclntReadTimeout struct {
232         Dummy uint8
233 }
234
235 func (*MemclntReadTimeout) GetMessageName() string {
236         return "memclnt_read_timeout"
237 }
238 func (*MemclntReadTimeout) GetCrcString() string {
239         return "c3a3a452"
240 }
241 func (*MemclntReadTimeout) GetMessageType() api.MessageType {
242         return api.OtherMessage
243 }
244
245 // MemclntRxThreadSuspend represents VPP binary API message 'memclnt_rx_thread_suspend':
246 type MemclntRxThreadSuspend struct {
247         Dummy uint8
248 }
249
250 func (*MemclntRxThreadSuspend) GetMessageName() string {
251         return "memclnt_rx_thread_suspend"
252 }
253 func (*MemclntRxThreadSuspend) GetCrcString() string {
254         return "c3a3a452"
255 }
256 func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType {
257         return api.OtherMessage
258 }
259
260 // RPCCall represents VPP binary API message 'rpc_call':
261 type RPCCall struct {
262         Function        uint64
263         Multicast       uint8
264         NeedBarrierSync uint8
265         SendReply       uint8
266         DataLen         uint32 `struc:"sizeof=Data"`
267         Data            []byte
268 }
269
270 func (*RPCCall) GetMessageName() string {
271         return "rpc_call"
272 }
273 func (*RPCCall) GetCrcString() string {
274         return "7e8a2c95"
275 }
276 func (*RPCCall) GetMessageType() api.MessageType {
277         return api.RequestMessage
278 }
279
280 // RPCCallReply represents VPP binary API message 'rpc_call_reply':
281 type RPCCallReply struct {
282         Retval int32
283 }
284
285 func (*RPCCallReply) GetMessageName() string {
286         return "rpc_call_reply"
287 }
288 func (*RPCCallReply) GetCrcString() string {
289         return "e8d4e804"
290 }
291 func (*RPCCallReply) GetMessageType() api.MessageType {
292         return api.ReplyMessage
293 }
294
295 // RxThreadExit represents VPP binary API message 'rx_thread_exit':
296 type RxThreadExit struct {
297         Dummy uint8
298 }
299
300 func (*RxThreadExit) GetMessageName() string {
301         return "rx_thread_exit"
302 }
303 func (*RxThreadExit) GetCrcString() string {
304         return "c3a3a452"
305 }
306 func (*RxThreadExit) GetMessageType() api.MessageType {
307         return api.OtherMessage
308 }
309
310 // SockInitShm represents VPP binary API message 'sock_init_shm':
311 type SockInitShm struct {
312         RequestedSize uint32
313         Nitems        uint8 `struc:"sizeof=Configs"`
314         Configs       []uint64
315 }
316
317 func (*SockInitShm) GetMessageName() string {
318         return "sock_init_shm"
319 }
320 func (*SockInitShm) GetCrcString() string {
321         return "51646d92"
322 }
323 func (*SockInitShm) GetMessageType() api.MessageType {
324         return api.RequestMessage
325 }
326
327 // SockInitShmReply represents VPP binary API message 'sock_init_shm_reply':
328 type SockInitShmReply struct {
329         Retval int32
330 }
331
332 func (*SockInitShmReply) GetMessageName() string {
333         return "sock_init_shm_reply"
334 }
335 func (*SockInitShmReply) GetCrcString() string {
336         return "e8d4e804"
337 }
338 func (*SockInitShmReply) GetMessageType() api.MessageType {
339         return api.ReplyMessage
340 }
341
342 // SockclntCreate represents VPP binary API message 'sockclnt_create':
343 type SockclntCreate struct {
344         Name []byte `struc:"[64]byte"`
345 }
346
347 func (*SockclntCreate) GetMessageName() string {
348         return "sockclnt_create"
349 }
350 func (*SockclntCreate) GetCrcString() string {
351         return "df2cf94d"
352 }
353 func (*SockclntCreate) GetMessageType() api.MessageType {
354         return api.ReplyMessage
355 }
356
357 // SockclntCreateReply represents VPP binary API message 'sockclnt_create_reply':
358 type SockclntCreateReply struct {
359         Response     int32
360         Index        uint32
361         Count        uint16 `struc:"sizeof=MessageTable"`
362         MessageTable []MessageTableEntry
363 }
364
365 func (*SockclntCreateReply) GetMessageName() string {
366         return "sockclnt_create_reply"
367 }
368 func (*SockclntCreateReply) GetCrcString() string {
369         return "a134a8a8"
370 }
371 func (*SockclntCreateReply) GetMessageType() api.MessageType {
372         return api.RequestMessage
373 }
374
375 // SockclntDelete represents VPP binary API message 'sockclnt_delete':
376 type SockclntDelete struct {
377         Index uint32
378 }
379
380 func (*SockclntDelete) GetMessageName() string {
381         return "sockclnt_delete"
382 }
383 func (*SockclntDelete) GetCrcString() string {
384         return "8ac76db6"
385 }
386 func (*SockclntDelete) GetMessageType() api.MessageType {
387         return api.RequestMessage
388 }
389
390 // SockclntDeleteReply represents VPP binary API message 'sockclnt_delete_reply':
391 type SockclntDeleteReply struct {
392         Response int32
393 }
394
395 func (*SockclntDeleteReply) GetMessageName() string {
396         return "sockclnt_delete_reply"
397 }
398 func (*SockclntDeleteReply) GetCrcString() string {
399         return "8f38b1ee"
400 }
401 func (*SockclntDeleteReply) GetMessageType() api.MessageType {
402         return api.ReplyMessage
403 }
404
405 // TracePluginMsgIds represents VPP binary API message 'trace_plugin_msg_ids':
406 type TracePluginMsgIds struct {
407         PluginName []byte `struc:"[128]byte"`
408         FirstMsgID uint16
409         LastMsgID  uint16
410 }
411
412 func (*TracePluginMsgIds) GetMessageName() string {
413         return "trace_plugin_msg_ids"
414 }
415 func (*TracePluginMsgIds) GetCrcString() string {
416         return "64af79f9"
417 }
418 func (*TracePluginMsgIds) GetMessageType() api.MessageType {
419         return api.RequestMessage
420 }
421
422 func init() {
423         api.RegisterMessage((*APIVersions)(nil), "memclnt.APIVersions")
424         api.RegisterMessage((*APIVersionsReply)(nil), "memclnt.APIVersionsReply")
425         api.RegisterMessage((*GetFirstMsgID)(nil), "memclnt.GetFirstMsgID")
426         api.RegisterMessage((*GetFirstMsgIDReply)(nil), "memclnt.GetFirstMsgIDReply")
427         api.RegisterMessage((*MemclntCreate)(nil), "memclnt.MemclntCreate")
428         api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt.MemclntCreateReply")
429         api.RegisterMessage((*MemclntDelete)(nil), "memclnt.MemclntDelete")
430         api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt.MemclntDeleteReply")
431         api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt.MemclntKeepalive")
432         api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt.MemclntKeepaliveReply")
433         api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt.MemclntReadTimeout")
434         api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt.MemclntRxThreadSuspend")
435         api.RegisterMessage((*RPCCall)(nil), "memclnt.RPCCall")
436         api.RegisterMessage((*RPCCallReply)(nil), "memclnt.RPCCallReply")
437         api.RegisterMessage((*RxThreadExit)(nil), "memclnt.RxThreadExit")
438         api.RegisterMessage((*SockInitShm)(nil), "memclnt.SockInitShm")
439         api.RegisterMessage((*SockInitShmReply)(nil), "memclnt.SockInitShmReply")
440         api.RegisterMessage((*SockclntCreate)(nil), "memclnt.SockclntCreate")
441         api.RegisterMessage((*SockclntCreateReply)(nil), "memclnt.SockclntCreateReply")
442         api.RegisterMessage((*SockclntDelete)(nil), "memclnt.SockclntDelete")
443         api.RegisterMessage((*SockclntDeleteReply)(nil), "memclnt.SockclntDeleteReply")
444         api.RegisterMessage((*TracePluginMsgIds)(nil), "memclnt.TracePluginMsgIds")
445 }
446
447 var Messages = []api.Message{
448         (*APIVersions)(nil),
449         (*APIVersionsReply)(nil),
450         (*GetFirstMsgID)(nil),
451         (*GetFirstMsgIDReply)(nil),
452         (*MemclntCreate)(nil),
453         (*MemclntCreateReply)(nil),
454         (*MemclntDelete)(nil),
455         (*MemclntDeleteReply)(nil),
456         (*MemclntKeepalive)(nil),
457         (*MemclntKeepaliveReply)(nil),
458         (*MemclntReadTimeout)(nil),
459         (*MemclntRxThreadSuspend)(nil),
460         (*RPCCall)(nil),
461         (*RPCCallReply)(nil),
462         (*RxThreadExit)(nil),
463         (*SockInitShm)(nil),
464         (*SockInitShmReply)(nil),
465         (*SockclntCreate)(nil),
466         (*SockclntCreateReply)(nil),
467         (*SockclntDelete)(nil),
468         (*SockclntDeleteReply)(nil),
469         (*TracePluginMsgIds)(nil),
470 }