summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-05-03 21:07:13 +0000
committerpeter <peter@FreeBSD.org>1997-05-03 21:07:13 +0000
commit97edcdf2f7e8f7cd5dc81bd510475b99b2df57ea (patch)
tree50b98afac73dc25b58e1fe305c05266a7f57d13f /sys/net/if.c
parentfeda6c95bd3113d5ced651679773a7116c70b5fb (diff)
downloadFreeBSD-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.c18
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);
OpenPOWER on IntegriCloud