History

tun: move internal flag defines out of uapi

TUN_ flags are internal and never exposed to userspace. Any application using it is almost certainly buggy. Move them out to tun.c. Note: we remove these completely in follow-up patches, this code movement is split out for ease of review.

Michael S. Tsirkin committed 11 years ago

Commit 031f5e01 parent 41e3e422 files · +24 −64Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/if_tun.h+3−13
@@ -22,21 +22,11 @@ · 21 unmodified lines
2222
2323 /* Read queue size */
2424 #define TUN_READQ_SIZE 500
25−
26−/* TUN device flags */
27−#define TUN_TUN_DEV 0x0001
28−#define TUN_TAP_DEV 0x0002
25+/* TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. */
26+#define TUN_TUN_DEV IFF_TUN
27+#define TUN_TAP_DEV IFF_TAP
2928 #define TUN_TYPE_MASK 0x000f
3029
31−#define TUN_FASYNC 0x0010
32−#define TUN_NOCHECKSUM 0x0020
33−#define TUN_NO_PI 0x0040
34−/* This flag has no real effect */
35−#define TUN_ONE_QUEUE 0x0080
36−#define TUN_PERSIST 0x0100
37−#define TUN_VNET_HDR 0x0200
38−#define TUN_TAP_MQ 0x0400
39−
4030 /* Ioctl defines */
4131 #define TUNSETNOCSUM _IOW('T', 200, int)
4232 #define TUNSETDEBUG _IOW('T', 201, int)