diff options
author | wollman <wollman@FreeBSD.org> | 1994-12-21 22:57:05 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-12-21 22:57:05 +0000 |
commit | 7d587b958356f1a73ccf6a7794d5edc094412662 (patch) | |
tree | 3d9f1d8581a45dffc05726c18b95431f11fc28d8 | |
parent | 1edc2b89b75b4476803966eaa91d02a788f4bba5 (diff) | |
download | FreeBSD-src-7d587b958356f1a73ccf6a7794d5edc094412662.zip FreeBSD-src-7d587b958356f1a73ccf6a7794d5edc094412662.tar.gz |
Add generic part of generic multiple-physical-interface support (the
successor of IFF_ALTPHYS).
-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 5412b21..31c53ed 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 dacff0c..0174f97 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 d6569de..41fc86b 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_ */ |