diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 13 | ||||
-rw-r--r-- | sys/net/if.h | 4 | ||||
-rw-r--r-- | sys/sys/sockio.h | 4 |
3 files changed, 18 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 5412b216b46c..31c53ed751db 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.9 1994/10/08 01:40:20 phk Exp $ + * $Id: if.c,v 1.10 1994/11/10 18:49:23 guido Exp $ */ #include <sys/param.h> @@ -496,6 +496,10 @@ ifioctl(so, cmd, data, p) ifr->ifr_mtu = ifp->if_mtu; break; + case SIOCGIFPHYS: + ifr->ifr_phys = ifp->if_physical; + break; + case SIOCSIFFLAGS: error = suser(p->p_ucred, &p->p_acflag); if (error) @@ -523,6 +527,13 @@ ifioctl(so, cmd, data, p) ifp->if_metric = ifr->ifr_metric; break; + case SIOCSIFPHYS: + error = suser(p->p_ucred, &p->p_acflag); + if (error) return error; + + if (!ifp->if_ioctl) return EOPNOTSUPP; + return ifp->if_ioctl(ifp, cmd, data); + case SIOCSIFMTU: error = suser(p->p_ucred, &p->p_acflag); if (error) diff --git a/sys/net/if.h b/sys/net/if.h index dacff0c786de..0174f9705547 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.h 8.1 (Berkeley) 6/10/93 - * $Id: if.h,v 1.11 1994/12/13 22:31:44 wollman Exp $ + * $Id: if.h,v 1.12 1994/12/21 18:03:41 wollman Exp $ */ #ifndef _NET_IF_H_ @@ -304,6 +304,7 @@ struct ifreq { short ifru_flags; int ifru_metric; int ifru_mtu; + int ifru_phys; caddr_t ifru_data; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ @@ -312,6 +313,7 @@ struct ifreq { #define ifr_flags ifr_ifru.ifru_flags /* flags */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ +#define ifr_phys ifr_ifru.ifru_phys; /* physical wire */ #define ifr_data ifr_ifru.ifru_data /* for use by interface */ }; diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index d6569de704fb..41fc86b15aac 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)sockio.h 8.1 (Berkeley) 3/28/94 - * $Id: sockio.h,v 1.3 1994/08/08 10:49:26 davidg Exp $ + * $Id: sockio.h,v 1.4 1994/09/06 22:42:31 wollman Exp $ */ #ifndef _SYS_SOCKIO_H_ @@ -81,5 +81,7 @@ #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */ #define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */ +#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */ +#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */ #endif /* !_SYS_SOCKIO_H_ */ |