mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
if_tuntap(4): Add TUNGIFNAME
This effectively just moves TAPGIFNAME into common ioctl territory. MFC after: 3 days
This commit is contained in:
parent
5d18382b72
commit
0dbac71f19
3 changed files with 7 additions and 7 deletions
|
|
@ -55,7 +55,7 @@
|
|||
#define TAPGDEBUG TUNGDEBUG
|
||||
#define TAPSIFINFO TUNSIFINFO
|
||||
#define TAPGIFINFO TUNGIFINFO
|
||||
#define TAPGIFNAME _IOR('t', 93, struct ifreq)
|
||||
#define TAPGIFNAME TUNGIFNAME
|
||||
|
||||
/* VMware ioctl's */
|
||||
#define VMIO_SIOCSIFFLAGS _IOWINT('V', 0)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ struct tuninfo {
|
|||
#define TUNSIFINFO _IOW('t', 91, struct tuninfo)
|
||||
#define TUNGIFINFO _IOR('t', 92, struct tuninfo)
|
||||
#define TUNSLMODE _IOW('t', 93, int)
|
||||
#define TUNGIFNAME _IOR('t', 93, struct ifreq)
|
||||
#define TUNSIFMODE _IOW('t', 94, int)
|
||||
#define TUNSIFPID _IO('t', 95)
|
||||
#define TUNSIFHEAD _IOW('t', 96, int)
|
||||
|
|
|
|||
|
|
@ -1235,12 +1235,6 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
|
|||
if (l2tun) {
|
||||
/* tap specific ioctls */
|
||||
switch(cmd) {
|
||||
case TAPGIFNAME:
|
||||
ifrp = (struct ifreq *)data;
|
||||
strlcpy(ifrp->ifr_name, TUN2IFP(tp)->if_xname,
|
||||
IFNAMSIZ);
|
||||
|
||||
return (0);
|
||||
/* VMware/VMnet port ioctl's */
|
||||
#if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \
|
||||
defined(COMPAT_FREEBSD4)
|
||||
|
|
@ -1337,6 +1331,11 @@ tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag,
|
|||
}
|
||||
|
||||
switch (cmd) {
|
||||
case TUNGIFNAME:
|
||||
ifrp = (struct ifreq *)data;
|
||||
strlcpy(ifrp->ifr_name, TUN2IFP(tp)->if_xname, IFNAMSIZ);
|
||||
|
||||
return (0);
|
||||
case TUNSIFINFO:
|
||||
tunp = (struct tuninfo *)data;
|
||||
if (TUN2IFP(tp)->if_type != tunp->type)
|
||||
|
|
|
|||
Loading…
Reference in a new issue