linux(4): Add 2 Linux socket ioctl commands

Support 2 Linux socket ioctl commands: SIOCGIFMETRIC, SIOCSIFMETRIC.

Differential revision:	https://reviews.freebsd.org/D39786
MFC after:		1 month
This commit is contained in:
Alvin Chen 2023-08-17 22:57:16 +03:00 committed by Dmitry Chagin
parent d1eb515f14
commit 1f2b31f76e
2 changed files with 8 additions and 0 deletions

View file

@ -2272,6 +2272,12 @@ linux_ioctl_socket_ifreq(struct thread *td, int fd, u_int cmd,
case LINUX_SIOCGIFHWADDR:
cmd = SIOCGHWADDR;
break;
case LINUX_SIOCGIFMETRIC:
cmd = SIOCGIFMETRIC;
break;
case LINUX_SIOCSIFMETRIC:
cmd = SIOCSIFMETRIC;
break;
/*
* XXX This is slightly bogus, but these ioctls are currently
* XXX only used by the aironet (if_an) network driver.

View file

@ -235,6 +235,8 @@
#define LINUX_SIOCGIFBRDADDR 0x8919
#define LINUX_SIOCGIFNETMASK 0x891b
#define LINUX_SIOCSIFNETMASK 0x891c
#define LINUX_SIOCGIFMETRIC 0x891d
#define LINUX_SIOCSIFMETRIC 0x891e
#define LINUX_SIOCGIFMTU 0x8921
#define LINUX_SIOCSIFMTU 0x8922
#define LINUX_SIOCSIFNAME 0x8923