summaryrefslogtreecommitdiffstats
path: root/sys/netipx
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2003-10-31 18:32:15 +0000
committerbrooks <brooks@FreeBSD.org>2003-10-31 18:32:15 +0000
commitf1e94c6f29b079e4ad9d9305ef3e90a719bcbbda (patch)
tree4d9e6671d486576767506230a4240131526fea49 /sys/netipx
parentbe546fdee455a96afdefee10d0bdba8547399f5b (diff)
downloadFreeBSD-src-f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda.zip
FreeBSD-src-f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda.tar.gz
Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
Diffstat (limited to 'sys/netipx')
-rw-r--r--sys/netipx/ipx_ip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c
index 4fa0bfa..d069fb9 100644
--- a/sys/netipx/ipx_ip.c
+++ b/sys/netipx/ipx_ip.c
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
#include <netipx/ipx_var.h>
static struct ifnet ipxipif;
+static int ipxipif_units;
/* list of all hosts and gateways or broadcast addrs */
static struct ifnet_en *ipxip_list;
@@ -94,7 +95,7 @@ ipxipattach()
if (ipxipif.if_mtu == 0) {
ifp = &ipxipif;
- ifp->if_name = "ipxip";
+ if_initname(ifp, "ipxip", ipxipif_units);
ifp->if_mtu = LOMTU;
ifp->if_ioctl = ipxipioctl;
ifp->if_output = ipxipoutput;
@@ -109,13 +110,12 @@ ipxipattach()
ipxip_list = m;
ifp = &m->ifen_ifnet;
- ifp->if_name = "ipxip";
+ if_initname(ifp, "ipxip", ipxipif_units++);
ifp->if_mtu = LOMTU;
ifp->if_ioctl = ipxipioctl;
ifp->if_output = ipxipoutput;
ifp->if_start = ipxipstart;
ifp->if_flags = IFF_POINTOPOINT;
- ifp->if_unit = ipxipif.if_unit++;
if_attach(ifp);
return (m);
@@ -379,7 +379,7 @@ ipxip_route(so, sopt)
/*
* now configure this as a point to point link
*/
- ifr_ipxip.ifr_name[4] = '0' + ipxipif.if_unit - 1;
+ ifr_ipxip.ifr_name[4] = '0' + ipxipif_units - 1;
ifr_ipxip.ifr_dstaddr = *(struct sockaddr *)ipx_dst;
ipx_control(so, (int)SIOCSIFDSTADDR, (caddr_t)&ifr_ipxip,
(struct ifnet *)ifn, sopt->sopt_td);
OpenPOWER on IntegriCloud