Add support for aliases and boolean type
[govpp.git] / examples / bin_api / tap / tap.ba.go
1 // Code generated by GoVPP binapi-generator. DO NOT EDIT.
2 //  source: tap.api.json
3
4 /*
5  Package tap is a generated from VPP binary API module 'tap'.
6
7  It contains following objects:
8           8 messages
9           4 services
10
11 */
12 package tap
13
14 import "git.fd.io/govpp.git/api"
15 import "github.com/lunixbochs/struc"
16 import "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 //
25 //      "services": {
26 //          "tap_delete": {
27 //              "reply": "tap_delete_reply"
28 //          },
29 //          "sw_interface_tap_dump": {
30 //              "reply": "sw_interface_tap_details",
31 //              "stream": true
32 //          },
33 //          "tap_modify": {
34 //              "reply": "tap_modify_reply"
35 //          },
36 //          "tap_connect": {
37 //              "reply": "tap_connect_reply"
38 //          }
39 //      },
40 //
41 type Services interface {
42         DumpSwInterfaceTap(*SwInterfaceTapDump) ([]*SwInterfaceTapDetails, error)
43         TapConnect(*TapConnect) (*TapConnectReply, error)
44         TapDelete(*TapDelete) (*TapDeleteReply, error)
45         TapModify(*TapModify) (*TapModifyReply, error)
46 }
47
48 /* Messages */
49
50 // TapConnect represents VPP binary API message 'tap_connect':
51 //
52 //      "tap_connect",
53 //      [
54 //          "u16",
55 //          "_vl_msg_id"
56 //      ],
57 //      [
58 //          "u32",
59 //          "client_index"
60 //      ],
61 //      [
62 //          "u32",
63 //          "context"
64 //      ],
65 //      [
66 //          "u8",
67 //          "use_random_mac"
68 //      ],
69 //      [
70 //          "u8",
71 //          "tap_name",
72 //          64
73 //      ],
74 //      [
75 //          "u8",
76 //          "mac_address",
77 //          6
78 //      ],
79 //      [
80 //          "u8",
81 //          "renumber"
82 //      ],
83 //      [
84 //          "u32",
85 //          "custom_dev_instance"
86 //      ],
87 //      [
88 //          "u8",
89 //          "ip4_address_set"
90 //      ],
91 //      [
92 //          "u8",
93 //          "ip4_address",
94 //          4
95 //      ],
96 //      [
97 //          "u8",
98 //          "ip4_mask_width"
99 //      ],
100 //      [
101 //          "u8",
102 //          "ip6_address_set"
103 //      ],
104 //      [
105 //          "u8",
106 //          "ip6_address",
107 //          16
108 //      ],
109 //      [
110 //          "u8",
111 //          "ip6_mask_width"
112 //      ],
113 //      [
114 //          "u8",
115 //          "tag",
116 //          64
117 //      ],
118 //      {
119 //          "crc": "0x9b9c396f"
120 //      }
121 //
122 type TapConnect struct {
123         UseRandomMac      uint8
124         TapName           []byte `struc:"[64]byte"`
125         MacAddress        []byte `struc:"[6]byte"`
126         Renumber          uint8
127         CustomDevInstance uint32
128         IP4AddressSet     uint8
129         IP4Address        []byte `struc:"[4]byte"`
130         IP4MaskWidth      uint8
131         IP6AddressSet     uint8
132         IP6Address        []byte `struc:"[16]byte"`
133         IP6MaskWidth      uint8
134         Tag               []byte `struc:"[64]byte"`
135 }
136
137 func (*TapConnect) GetMessageName() string {
138         return "tap_connect"
139 }
140 func (*TapConnect) GetCrcString() string {
141         return "9b9c396f"
142 }
143 func (*TapConnect) GetMessageType() api.MessageType {
144         return api.RequestMessage
145 }
146
147 // TapConnectReply represents VPP binary API message 'tap_connect_reply':
148 //
149 //      "tap_connect_reply",
150 //      [
151 //          "u16",
152 //          "_vl_msg_id"
153 //      ],
154 //      [
155 //          "u32",
156 //          "context"
157 //      ],
158 //      [
159 //          "i32",
160 //          "retval"
161 //      ],
162 //      [
163 //          "u32",
164 //          "sw_if_index"
165 //      ],
166 //      {
167 //          "crc": "0xfda5941f"
168 //      }
169 //
170 type TapConnectReply struct {
171         Retval    int32
172         SwIfIndex uint32
173 }
174
175 func (*TapConnectReply) GetMessageName() string {
176         return "tap_connect_reply"
177 }
178 func (*TapConnectReply) GetCrcString() string {
179         return "fda5941f"
180 }
181 func (*TapConnectReply) GetMessageType() api.MessageType {
182         return api.ReplyMessage
183 }
184
185 // TapModify represents VPP binary API message 'tap_modify':
186 //
187 //      "tap_modify",
188 //      [
189 //          "u16",
190 //          "_vl_msg_id"
191 //      ],
192 //      [
193 //          "u32",
194 //          "client_index"
195 //      ],
196 //      [
197 //          "u32",
198 //          "context"
199 //      ],
200 //      [
201 //          "u32",
202 //          "sw_if_index"
203 //      ],
204 //      [
205 //          "u8",
206 //          "use_random_mac"
207 //      ],
208 //      [
209 //          "u8",
210 //          "tap_name",
211 //          64
212 //      ],
213 //      [
214 //          "u8",
215 //          "mac_address",
216 //          6
217 //      ],
218 //      [
219 //          "u8",
220 //          "renumber"
221 //      ],
222 //      [
223 //          "u32",
224 //          "custom_dev_instance"
225 //      ],
226 //      {
227 //          "crc": "0x8047ae5c"
228 //      }
229 //
230 type TapModify struct {
231         SwIfIndex         uint32
232         UseRandomMac      uint8
233         TapName           []byte `struc:"[64]byte"`
234         MacAddress        []byte `struc:"[6]byte"`
235         Renumber          uint8
236         CustomDevInstance uint32
237 }
238
239 func (*TapModify) GetMessageName() string {
240         return "tap_modify"
241 }
242 func (*TapModify) GetCrcString() string {
243         return "8047ae5c"
244 }
245 func (*TapModify) GetMessageType() api.MessageType {
246         return api.RequestMessage
247 }
248
249 // TapModifyReply represents VPP binary API message 'tap_modify_reply':
250 //
251 //      "tap_modify_reply",
252 //      [
253 //          "u16",
254 //          "_vl_msg_id"
255 //      ],
256 //      [
257 //          "u32",
258 //          "context"
259 //      ],
260 //      [
261 //          "i32",
262 //          "retval"
263 //      ],
264 //      [
265 //          "u32",
266 //          "sw_if_index"
267 //      ],
268 //      {
269 //          "crc": "0xfda5941f"
270 //      }
271 //
272 type TapModifyReply struct {
273         Retval    int32
274         SwIfIndex uint32
275 }
276
277 func (*TapModifyReply) GetMessageName() string {
278         return "tap_modify_reply"
279 }
280 func (*TapModifyReply) GetCrcString() string {
281         return "fda5941f"
282 }
283 func (*TapModifyReply) GetMessageType() api.MessageType {
284         return api.ReplyMessage
285 }
286
287 // TapDelete represents VPP binary API message 'tap_delete':
288 //
289 //      "tap_delete",
290 //      [
291 //          "u16",
292 //          "_vl_msg_id"
293 //      ],
294 //      [
295 //          "u32",
296 //          "client_index"
297 //      ],
298 //      [
299 //          "u32",
300 //          "context"
301 //      ],
302 //      [
303 //          "u32",
304 //          "sw_if_index"
305 //      ],
306 //      {
307 //          "crc": "0x529cb13f"
308 //      }
309 //
310 type TapDelete struct {
311         SwIfIndex uint32
312 }
313
314 func (*TapDelete) GetMessageName() string {
315         return "tap_delete"
316 }
317 func (*TapDelete) GetCrcString() string {
318         return "529cb13f"
319 }
320 func (*TapDelete) GetMessageType() api.MessageType {
321         return api.RequestMessage
322 }
323
324 // TapDeleteReply represents VPP binary API message 'tap_delete_reply':
325 //
326 //      "tap_delete_reply",
327 //      [
328 //          "u16",
329 //          "_vl_msg_id"
330 //      ],
331 //      [
332 //          "u32",
333 //          "context"
334 //      ],
335 //      [
336 //          "i32",
337 //          "retval"
338 //      ],
339 //      {
340 //          "crc": "0xe8d4e804"
341 //      }
342 //
343 type TapDeleteReply struct {
344         Retval int32
345 }
346
347 func (*TapDeleteReply) GetMessageName() string {
348         return "tap_delete_reply"
349 }
350 func (*TapDeleteReply) GetCrcString() string {
351         return "e8d4e804"
352 }
353 func (*TapDeleteReply) GetMessageType() api.MessageType {
354         return api.ReplyMessage
355 }
356
357 // SwInterfaceTapDump represents VPP binary API message 'sw_interface_tap_dump':
358 //
359 //      "sw_interface_tap_dump",
360 //      [
361 //          "u16",
362 //          "_vl_msg_id"
363 //      ],
364 //      [
365 //          "u32",
366 //          "client_index"
367 //      ],
368 //      [
369 //          "u32",
370 //          "context"
371 //      ],
372 //      {
373 //          "crc": "0x51077d14"
374 //      }
375 //
376 type SwInterfaceTapDump struct{}
377
378 func (*SwInterfaceTapDump) GetMessageName() string {
379         return "sw_interface_tap_dump"
380 }
381 func (*SwInterfaceTapDump) GetCrcString() string {
382         return "51077d14"
383 }
384 func (*SwInterfaceTapDump) GetMessageType() api.MessageType {
385         return api.RequestMessage
386 }
387
388 // SwInterfaceTapDetails represents VPP binary API message 'sw_interface_tap_details':
389 //
390 //      "sw_interface_tap_details",
391 //      [
392 //          "u16",
393 //          "_vl_msg_id"
394 //      ],
395 //      [
396 //          "u32",
397 //          "context"
398 //      ],
399 //      [
400 //          "u32",
401 //          "sw_if_index"
402 //      ],
403 //      [
404 //          "u8",
405 //          "dev_name",
406 //          64
407 //      ],
408 //      {
409 //          "crc": "0x76229a57"
410 //      }
411 //
412 type SwInterfaceTapDetails struct {
413         SwIfIndex uint32
414         DevName   []byte `struc:"[64]byte"`
415 }
416
417 func (*SwInterfaceTapDetails) GetMessageName() string {
418         return "sw_interface_tap_details"
419 }
420 func (*SwInterfaceTapDetails) GetCrcString() string {
421         return "76229a57"
422 }
423 func (*SwInterfaceTapDetails) GetMessageType() api.MessageType {
424         return api.ReplyMessage
425 }
426
427 func init() {
428         api.RegisterMessage((*TapConnect)(nil), "tap.TapConnect")
429         api.RegisterMessage((*TapConnectReply)(nil), "tap.TapConnectReply")
430         api.RegisterMessage((*TapModify)(nil), "tap.TapModify")
431         api.RegisterMessage((*TapModifyReply)(nil), "tap.TapModifyReply")
432         api.RegisterMessage((*TapDelete)(nil), "tap.TapDelete")
433         api.RegisterMessage((*TapDeleteReply)(nil), "tap.TapDeleteReply")
434         api.RegisterMessage((*SwInterfaceTapDump)(nil), "tap.SwInterfaceTapDump")
435         api.RegisterMessage((*SwInterfaceTapDetails)(nil), "tap.SwInterfaceTapDetails")
436 }