summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/sockios.h
diff options
context:
space:
mode:
authorGao Feng2016-10-27 03:05:22 +0200
committerDavid S. Miller2016-10-31 15:56:47 +0100
commit20861f26e33d76a4f3587bcc866fa1dab3e01094 (patch)
treef27493e8976cf194e01148dd10f3183686d057c5 /include/uapi/linux/sockios.h
parentnet: add an ioctl to get a socket network namespace (diff)
downloadkernel-qcow2-linux-20861f26e33d76a4f3587bcc866fa1dab3e01094.tar.gz
kernel-qcow2-linux-20861f26e33d76a4f3587bcc866fa1dab3e01094.tar.xz
kernel-qcow2-linux-20861f26e33d76a4f3587bcc866fa1dab3e01094.zip
driver: tun: Use new macro SOCK_IOC_TYPE instead of literal number 0x89
The current codes use _IOC_TYPE(cmd) == 0x89 to check if the cmd is one socket ioctl command like SIOCGIFHWADDR. But the literal number 0x89 may confuse readers. So create one macro SOCK_IOC_TYPE to enhance the readability. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/sockios.h')
-rw-r--r--include/uapi/linux/sockios.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h
index 83cc54ce6081..79d029d25310 100644
--- a/include/uapi/linux/sockios.h
+++ b/include/uapi/linux/sockios.h
@@ -24,6 +24,8 @@
#define SIOCINQ FIONREAD
#define SIOCOUTQ TIOCOUTQ /* output queue size (not sent + not acked) */
+#define SOCK_IOC_TYPE 0x89
+
/* Routing table calls. */
#define SIOCADDRT 0x890B /* add routing table entry */
#define SIOCDELRT 0x890C /* delete routing table entry */