The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __IF_TUN_H |
| 13 | #define __IF_TUN_H |
| 14 | |
| 15 | #define TUN_READQ_SIZE 500 |
| 16 | |
| 17 | #define TUN_TUN_DEV 0x0001 |
| 18 | #define TUN_TAP_DEV 0x0002 |
| 19 | #define TUN_TYPE_MASK 0x000f |
| 20 | |
| 21 | #define TUN_FASYNC 0x0010 |
| 22 | #define TUN_NOCHECKSUM 0x0020 |
| 23 | #define TUN_NO_PI 0x0040 |
| 24 | #define TUN_ONE_QUEUE 0x0080 |
| 25 | #define TUN_PERSIST 0x0100 |
| 26 | |
| 27 | #define TUNSETNOCSUM _IOW('T', 200, int) |
| 28 | #define TUNSETDEBUG _IOW('T', 201, int) |
| 29 | #define TUNSETIFF _IOW('T', 202, int) |
| 30 | #define TUNSETPERSIST _IOW('T', 203, int) |
| 31 | #define TUNSETOWNER _IOW('T', 204, int) |
| 32 | #define TUNSETLINK _IOW('T', 205, int) |
| 33 | |
| 34 | #define IFF_TUN 0x0001 |
| 35 | #define IFF_TAP 0x0002 |
| 36 | #define IFF_NO_PI 0x1000 |
| 37 | #define IFF_ONE_QUEUE 0x2000 |
| 38 | |
| 39 | struct tun_pi { |
| 40 | unsigned short flags; |
| 41 | unsigned short proto; |
| 42 | }; |
| 43 | #define TUN_PKT_STRIP 0x0001 |
| 44 | |
| 45 | #endif |