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