diff options
author | kib <kib@FreeBSD.org> | 2007-11-07 16:42:52 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2007-11-07 16:42:52 +0000 |
commit | 42f4fb0d92887bff8668df307654d1b9de73cb61 (patch) | |
tree | ed5af715b6445440ac668f620c778baeb87ef13d /sys/compat/linux/linux_ioctl.c | |
parent | 0e5790193d3a6b51eb903e21376f94effc473df3 (diff) | |
download | FreeBSD-src-42f4fb0d92887bff8668df307654d1b9de73cb61.zip FreeBSD-src-42f4fb0d92887bff8668df307654d1b9de73cb61.tar.gz |
Implement LINUX_SIOCGIFCOUNT and LINUX_SIOCGIFINDEX/LINUX_SIOGIFINDEX.
LINUX_SIOCGIFCOUNT just returns 0 since it is not implemented in the
Linux 2.6.16.
LINUX_SIOCGIFINDEX/LINUX_SIOGIFINDEX are mapped to the FreeBSD native
SIOCGIFINDEX.
Tested by: Peter Kostouros <kpeter@melbpc.org.au>
Reviewed by: brooks, rpaulo (on net@)
Submitted by: rdivacky
MFC after: 1 week
Diffstat (limited to 'sys/compat/linux/linux_ioctl.c')
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 11 |
1 files changed, 11 insertions, 0 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. |