summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_ioctl.c11
-rw-r--r--sys/compat/linux/linux_ioctl.h5
2 files changed, 15 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 9583551..8e42ec1 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -2323,6 +2323,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCGIFCONF:
case LINUX_SIOCGPGRP:
case LINUX_SIOCSPGRP:
+ case LINUX_SIOCGIFCOUNT:
/* these ioctls don't take an interface name */
#ifdef DEBUG
printf("%s(): ioctl %d\n", __func__,
@@ -2344,6 +2345,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
case LINUX_SIOCSIFHWADDR:
case LINUX_SIOCDEVPRIVATE:
case LINUX_SIOCDEVPRIVATE+1:
+ case LINUX_SIOCGIFINDEX:
/* copy in the interface name and translate it. */
error = copyin((void *)args->arg, lifname, LINUX_IFNAMSIZ);
if (error != 0)
@@ -2478,6 +2480,15 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
error = ioctl(td, (struct ioctl_args *)args);
break;
+ case LINUX_SIOCGIFINDEX:
+ args->cmd = SIOCGIFINDEX;
+ error = ioctl(td, (struct ioctl_args *)args);
+ break;
+
+ case LINUX_SIOCGIFCOUNT:
+ error = 0;
+ break;
+
/*
* XXX This is slightly bogus, but these ioctls are currently
* XXX only used by the aironet (if_an) network driver.
diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h
index 1f838ba..2302a8c 100644
--- a/sys/compat/linux/linux_ioctl.h
+++ b/sys/compat/linux/linux_ioctl.h
@@ -230,9 +230,12 @@
#define LINUX_SIOCGIFHWADDR 0x8927
#define LINUX_SIOCADDMULTI 0x8931
#define LINUX_SIOCDELMULTI 0x8932
+#define LINUX_SIOCGIFINDEX 0x8933
+#define LINUX_SIOGIFINDEX LINUX_SIOCGIFINDEX
+#define LINUX_SIOCGIFCOUNT 0x8938
#define LINUX_IOCTL_SOCKET_MIN LINUX_FIOSETOWN
-#define LINUX_IOCTL_SOCKET_MAX LINUX_SIOCDELMULTI
+#define LINUX_IOCTL_SOCKET_MAX LINUX_SIOCGIFCOUNT
/*
* Device private ioctl calls
OpenPOWER on IntegriCloud