diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1994-12-21 22:57:05 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-12-21 22:57:05 +0000 |
commit | 074c4a4e2ee4029e924580f689ec868500c8a75b (patch) | |
tree | 3d9f1d8581a45dffc05726c18b95431f11fc28d8 /sys/net | |
parent | b67268cfbc906c7d11a112655024a63623372520 (diff) | |
download | src-074c4a4e2ee4029e924580f689ec868500c8a75b.tar.gz src-074c4a4e2ee4029e924580f689ec868500c8a75b.zip |
Add generic part of generic multiple-physical-interface support (the
successor of IFF_ALTPHYS).
Notes
Notes:
svn path=/head/; revision=5184
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 13 | ||||
-rw-r--r-- | sys/net/if.h | 4 |
2 files changed, 15 insertions, 2 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 */ }; |