diff options
author | peter <peter@FreeBSD.org> | 1997-05-03 21:07:13 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-05-03 21:07:13 +0000 |
commit | 97edcdf2f7e8f7cd5dc81bd510475b99b2df57ea (patch) | |
tree | 50b98afac73dc25b58e1fe305c05266a7f57d13f /sys/net/if.c | |
parent | feda6c95bd3113d5ced651679773a7116c70b5fb (diff) | |
download | FreeBSD-src-97edcdf2f7e8f7cd5dc81bd510475b99b2df57ea.zip FreeBSD-src-97edcdf2f7e8f7cd5dc81bd510475b99b2df57ea.tar.gz |
add SIOC{S,G}IFMEDIA ioctl support
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 115cd64..017cf32 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.46 1997/03/24 11:33:08 bde Exp $ + * $Id: if.c,v 1.47 1997/04/27 20:00:56 wollman Exp $ */ #include <sys/param.h> @@ -593,6 +593,22 @@ ifioctl(so, cmd, data, p) microtime(&ifp->if_lastchange); return error; + case SIOCSIFMEDIA: + error = suser(p->p_ucred, &p->p_acflag); + if (error) + return (error); + if (ifp->if_ioctl == 0) + return (EOPNOTSUPP); + error = (*ifp->if_ioctl)(ifp, cmd, data); + if (error == 0) + microtime(&ifp->if_lastchange); + return error; + + case SIOCGIFMEDIA: + if (ifp->if_ioctl == 0) + return (EOPNOTSUPP); + return ((*ifp->if_ioctl)(ifp, cmd, data)); + default: if (so->so_proto == 0) return (EOPNOTSUPP); |