root / net / tap-linux.h @ f5c5e381
History | View | Annotate | Download (1.6 kB)
1 | 76682299 | Mark McLoughlin | /*
|
---|---|---|---|
2 | 76682299 | Mark McLoughlin | * Universal TUN/TAP device driver.
|
3 | 76682299 | Mark McLoughlin | * Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>
|
4 | 76682299 | Mark McLoughlin | *
|
5 | 76682299 | Mark McLoughlin | * This program is free software; you can redistribute it and/or modify
|
6 | 76682299 | Mark McLoughlin | * it under the terms of the GNU General Public License as published by
|
7 | 76682299 | Mark McLoughlin | * the Free Software Foundation; either version 2 of the License, or
|
8 | 76682299 | Mark McLoughlin | * (at your option) any later version.
|
9 | 76682299 | Mark McLoughlin | *
|
10 | 76682299 | Mark McLoughlin | * This program is distributed in the hope that it will be useful,
|
11 | 76682299 | Mark McLoughlin | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 | 76682299 | Mark McLoughlin | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 | 76682299 | Mark McLoughlin | * GNU General Public License for more details.
|
14 | 76682299 | Mark McLoughlin | */
|
15 | 76682299 | Mark McLoughlin | |
16 | 76682299 | Mark McLoughlin | #ifndef QEMU_TAP_H
|
17 | 76682299 | Mark McLoughlin | #define QEMU_TAP_H
|
18 | 76682299 | Mark McLoughlin | |
19 | 8e0f8e5b | Mark McLoughlin | #include <stdint.h> |
20 | ed7193ec | Anthony Liguori | #ifdef __linux__
|
21 | 71f4effc | Alexander Graf | |
22 | 76682299 | Mark McLoughlin | #include <linux/ioctl.h> |
23 | 76682299 | Mark McLoughlin | |
24 | 76682299 | Mark McLoughlin | /* Ioctl defines */
|
25 | 76682299 | Mark McLoughlin | #define TUNSETIFF _IOW('T', 202, int) |
26 | 8e0f8e5b | Mark McLoughlin | #define TUNGETFEATURES _IOR('T', 207, unsigned int) |
27 | b1c28b46 | Mark McLoughlin | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) |
28 | 8e0f8e5b | Mark McLoughlin | #define TUNGETIFF _IOR('T', 210, unsigned int) |
29 | 76682299 | Mark McLoughlin | #define TUNSETSNDBUF _IOW('T', 212, int) |
30 | 76682299 | Mark McLoughlin | |
31 | 71f4effc | Alexander Graf | #endif
|
32 | 71f4effc | Alexander Graf | |
33 | 76682299 | Mark McLoughlin | /* TUNSETIFF ifr flags */
|
34 | 76682299 | Mark McLoughlin | #define IFF_TAP 0x0002 |
35 | 76682299 | Mark McLoughlin | #define IFF_NO_PI 0x1000 |
36 | 8e0f8e5b | Mark McLoughlin | #define IFF_VNET_HDR 0x4000 |
37 | 8e0f8e5b | Mark McLoughlin | |
38 | b1c28b46 | Mark McLoughlin | /* Features for GSO (TUNSETOFFLOAD). */
|
39 | b1c28b46 | Mark McLoughlin | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ |
40 | b1c28b46 | Mark McLoughlin | #define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */ |
41 | b1c28b46 | Mark McLoughlin | #define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ |
42 | b1c28b46 | Mark McLoughlin | #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ |
43 | 6c9f58ba | Sridhar Samudrala | #define TUN_F_UFO 0x10 /* I can handle UFO packets */ |
44 | b1c28b46 | Mark McLoughlin | |
45 | 8e0f8e5b | Mark McLoughlin | struct virtio_net_hdr
|
46 | 8e0f8e5b | Mark McLoughlin | { |
47 | 8e0f8e5b | Mark McLoughlin | uint8_t flags; |
48 | 8e0f8e5b | Mark McLoughlin | uint8_t gso_type; |
49 | 8e0f8e5b | Mark McLoughlin | uint16_t hdr_len; |
50 | 8e0f8e5b | Mark McLoughlin | uint16_t gso_size; |
51 | 8e0f8e5b | Mark McLoughlin | uint16_t csum_start; |
52 | 8e0f8e5b | Mark McLoughlin | uint16_t csum_offset; |
53 | 8e0f8e5b | Mark McLoughlin | }; |
54 | 76682299 | Mark McLoughlin | |
55 | 76682299 | Mark McLoughlin | #endif /* QEMU_TAP_H */ |