diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-25 07:37:30 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-25 07:37:30 +0000 |
commit | f46bfe93fe70beae8f5c44a1b619f0e4e4c96fbe (patch) | |
tree | 3a56714113f45a63bcbe077fccc3dab2367a777f /sys/net/if.c | |
parent | 6bf8a14cc6e854e9823512250f69523fba92974b (diff) |
add SIOCGIFDATA; fetches ifdata structure attached to each interface
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index fe46db122a6..301b1007507 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.15 1997/12/31 04:09:32 mickey Exp $ */ +/* $OpenBSD: if.c,v 1.16 1998/03/25 07:37:29 deraadt Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -468,6 +468,11 @@ ifioctl(so, cmd, data, p) ifr->ifr_metric = ifp->if_metric; break; + case SIOCGIFDATA: + error = copyout((caddr_t)&ifp->if_data, ifr->ifr_data, + sizeof(ifp->if_data)); + break; + case SIOCSIFFLAGS: if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) return (error); |