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