aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-12-22 21:56:22 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-12-22 21:56:22 +0000
commitdd2e4102219ce94f36901e8659a56f321933b0ba (patch)
treedd986184c8951fb36a642ae622be3def3ec5b792 /sys
parent186c582fdfcb3cb667af79150b6decea3a35e760 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/de/if_de.c4
-rw-r--r--sys/dev/ed/if_ed.c11
-rw-r--r--sys/dev/ep/if_ep.c3
-rw-r--r--sys/dev/ie/if_ie.c6
-rw-r--r--sys/dev/lnc/if_lnc.c3
-rw-r--r--sys/i386/isa/if_ed.c11
-rw-r--r--sys/i386/isa/if_el.c11
-rw-r--r--sys/i386/isa/if_ep.c3
-rw-r--r--sys/i386/isa/if_ie.c6
-rw-r--r--sys/i386/isa/if_is.c12
-rw-r--r--sys/i386/isa/if_le.c15
-rw-r--r--sys/i386/isa/if_lnc.c3
-rw-r--r--sys/i386/pci/if_de.c4
-rw-r--r--sys/netinet/if_ether.c13
-rw-r--r--sys/netinet/if_ether.h3
-rw-r--r--sys/netinet/in.c11
-rw-r--r--sys/pci/if_de.c4
17 files changed, 44 insertions, 79 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index 45cb17622b142..b858b3f058006 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -863,7 +863,7 @@ tulip_ioctl(
((struct arpcom *)ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
tulip_addr_filter(sc); /* reset multicast filtering */
(*ifp->if_init)(ifp->if_unit);
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
}
#endif /* INET */
@@ -1108,7 +1108,7 @@ tulip_pci_attach(
return;
}
- bzero(sc, sizeof(*sc)); /* Zero out the softc*/
+ bzero(sc, sizeof(sc)); /* Zero out the softc*/
sc->tulip_rxspace = vm_page_alloc_contig(TULIP_RXSPACE + NBPG, 0, 0xffffffff, PAGE_SIZE);
/*
* We've allocated an extra page of receive space so we can double map
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 2b2ff84ae08a4..39622f1097281 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.57 1994/11/24 14:29:16 davidg Exp $
+ * $Id: if_ed.c,v 1.58 1994/11/26 10:51:49 davidg Exp $
*/
#include "ed.h"
@@ -1925,14 +1925,7 @@ ed_ioctl(ifp, command, data)
#ifdef INET
case AF_INET:
ed_init(ifp->if_unit); /* before arpwhohas */
-
- /*
- * See if another station has *our* IP address. i.e.:
- * There is an address conflict! If a conflict exists,
- * a message is sent to the console.
- */
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
#ifdef NS
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index f73c9a65f025d..15dab0681a93e 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -1190,8 +1190,7 @@ epioctl(ifp, cmd, data)
#ifdef INET
case AF_INET:
epinit(ifp->if_unit); /* before arpwhohas */
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
#ifdef NS
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index ae4998425d328..691f0f4b008e3 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.18 1994/10/26 00:16:17 phk Exp $
+ * $Id: if_ie.c,v 1.19 1994/11/24 14:29:20 davidg Exp $
*/
/*
@@ -1887,9 +1887,7 @@ ieioctl(ifp, command, data)
#ifdef INET
case AF_INET:
ieinit(ifp->if_unit);
- ((struct arpcom *)ifp)->ac_ipaddr =
- IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif /* INET */
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index 311f3bd36d2dc..96c7b05032291 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -1509,8 +1509,7 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
#ifdef INET
case AF_INET:
lnc_init(ifp->if_unit);
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
default:
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index 2b2ff84ae08a4..39622f1097281 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.57 1994/11/24 14:29:16 davidg Exp $
+ * $Id: if_ed.c,v 1.58 1994/11/26 10:51:49 davidg Exp $
*/
#include "ed.h"
@@ -1925,14 +1925,7 @@ ed_ioctl(ifp, command, data)
#ifdef INET
case AF_INET:
ed_init(ifp->if_unit); /* before arpwhohas */
-
- /*
- * See if another station has *our* IP address. i.e.:
- * There is an address conflict! If a conflict exists,
- * a message is sent to the console.
- */
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
#ifdef NS
diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c
index 1835480d4250d..fee5127686ead 100644
--- a/sys/i386/isa/if_el.c
+++ b/sys/i386/isa/if_el.c
@@ -6,7 +6,7 @@
*
* Questions, comments, bug reports and fixes to kimmel@cs.umass.edu.
*
- * $Id: if_el.c,v 1.8 1994/10/23 21:27:17 wollman Exp $
+ * $Id: if_el.c,v 1.9 1994/11/24 14:29:17 davidg Exp $
*/
/* Except of course for the portions of code lifted from other FreeBSD
* drivers (mainly elread, elget and el_ioctl)
@@ -701,14 +701,7 @@ el_ioctl(ifp, command, data)
#ifdef INET
case AF_INET:
el_init(ifp->if_unit); /* before arpwhohas */
- /*
- * See if another station has *our* IP address.
- * i.e.: There is an address conflict! If a
- * conflict exists, a message is sent to the
- * console.
- */
- ((struct arpcom *)ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
#ifdef NS
diff --git a/sys/i386/isa/if_ep.c b/sys/i386/isa/if_ep.c
index f73c9a65f025d..15dab0681a93e 100644
--- a/sys/i386/isa/if_ep.c
+++ b/sys/i386/isa/if_ep.c
@@ -1190,8 +1190,7 @@ epioctl(ifp, cmd, data)
#ifdef INET
case AF_INET:
epinit(ifp->if_unit); /* before arpwhohas */
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
#ifdef NS
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index ae4998425d328..691f0f4b008e3 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -43,7 +43,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ie.c,v 1.18 1994/10/26 00:16:17 phk Exp $
+ * $Id: if_ie.c,v 1.19 1994/11/24 14:29:20 davidg Exp $
*/
/*
@@ -1887,9 +1887,7 @@ ieioctl(ifp, command, data)
#ifdef INET
case AF_INET:
ieinit(ifp->if_unit);
- ((struct arpcom *)ifp)->ac_ipaddr =
- IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif /* INET */
diff --git a/sys/i386/isa/if_is.c b/sys/i386/isa/if_is.c
index fdb1c4e53fd69..b374c1091487d 100644
--- a/sys/i386/isa/if_is.c
+++ b/sys/i386/isa/if_is.c
@@ -11,7 +11,7 @@
* of this software, nor does the author assume any responsibility
* for damages incurred with its use.
*
- * $Id: if_is.c,v 1.31 1994/10/29 10:19:32 phk Exp $
+ * $Id: if_is.c,v 1.32 1994/11/24 14:29:22 davidg Exp $
*/
/* TODO
@@ -945,15 +945,7 @@ is_ioctl(ifp, cmd, data)
#ifdef INET
case AF_INET:
is_init(ifp->if_unit); /* before arpwhohas */
- /*
- * See if another station has *our* IP address.
- * i.e.: There is an address conflict! If a
- * conflict exists, a message is sent to the
- * console.
- */
- ((struct arpcom *)ifp)->ac_ipaddr =
- IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
#ifdef NS
diff --git a/sys/i386/isa/if_le.c b/sys/i386/isa/if_le.c
index 1084ce3deb955..f54b0ab01ab49 100644
--- a/sys/i386/isa/if_le.c
+++ b/sys/i386/isa/if_le.c
@@ -605,8 +605,7 @@ le_ioctl(
#ifdef INET
case AF_INET: {
(*ifp->if_init)(ifp->if_unit);
- ((struct arpcom *)ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
}
#endif /* INET */
@@ -834,7 +833,7 @@ le_multi_op(
#define LEMAC_32K_MODE(mbase) (((mbase) >= 0x14) && ((mbase) <= 0x1F))
#define LEMAC_2K_MODE(mbase) ( (mbase) >= 0x40)
-/* static int lemac_probe(le_softc_t *sc, const le_board_t *bd, int *msize); */
+static int lemac_probe(le_softc_t *sc, const le_board_t *bd, int *msize);
static void lemac_init(int unit);
static void lemac_start(struct ifnet *ifp);
static void lemac_reset(IF_RESET_ARGS);
@@ -847,10 +846,10 @@ static int lemac_read_eeprom(le_softc_t *sc);
static void lemac_init_adapmem(le_softc_t *sc);
static const le_mcbits_t lemac_allmulti_mctbl[16] = {
- 0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
- 0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
- 0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
- 0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
};
/*
* An IRQ mapping table. Less space than switch statement.
@@ -1354,7 +1353,7 @@ lemac_init_adapmem(
* Start of DEPCA (DE200/DE201/DE202/DE422 etal) support.
*
*/
-/* static int depca_probe(le_softc_t *sc, const le_board_t *bd, int *msize); */
+static int depca_probe(le_softc_t *sc, const le_board_t *bd, int *msize);
static void depca_intr(le_softc_t *sc);
static int lance_init_adapmem(le_softc_t *sc);
static int lance_init_ring(le_softc_t *sc, ln_ring_t *rp, lance_ring_t *ri,
diff --git a/sys/i386/isa/if_lnc.c b/sys/i386/isa/if_lnc.c
index 311f3bd36d2dc..96c7b05032291 100644
--- a/sys/i386/isa/if_lnc.c
+++ b/sys/i386/isa/if_lnc.c
@@ -1509,8 +1509,7 @@ lnc_ioctl(struct ifnet * ifp, int command, caddr_t data)
#ifdef INET
case AF_INET:
lnc_init(ifp->if_unit);
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
#endif
default:
diff --git a/sys/i386/pci/if_de.c b/sys/i386/pci/if_de.c
index 45cb17622b142..b858b3f058006 100644
--- a/sys/i386/pci/if_de.c
+++ b/sys/i386/pci/if_de.c
@@ -863,7 +863,7 @@ tulip_ioctl(
((struct arpcom *)ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
tulip_addr_filter(sc); /* reset multicast filtering */
(*ifp->if_init)(ifp->if_unit);
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
}
#endif /* INET */
@@ -1108,7 +1108,7 @@ tulip_pci_attach(
return;
}
- bzero(sc, sizeof(*sc)); /* Zero out the softc*/
+ bzero(sc, sizeof(sc)); /* Zero out the softc*/
sc->tulip_rxspace = vm_page_alloc_contig(TULIP_RXSPACE + NBPG, 0, 0xffffffff, PAGE_SIZE);
/*
* We've allocated an extra page of receive space so we can double map
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 5790eb6671fb8..b2c22cfc71759 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.c 8.1 (Berkeley) 6/10/93
- * $Id: if_ether.c,v 1.7 1994/11/02 00:58:29 wollman Exp $
+ * $Id: if_ether.c,v 1.8 1994/12/13 22:32:44 wollman Exp $
*/
/*
@@ -632,3 +632,14 @@ arpioctl(cmd, data)
{
return (EOPNOTSUPP);
}
+
+void
+arp_ifinit(ac, ifa)
+ struct arpcom *ac;
+ struct ifaddr *ifa;
+{
+ ac->ac_ipaddr = IA_SIN(ifa)->sin_addr;
+ arpwhohas(ac, &ac->ac_ipaddr);
+ ifa->ifa_rtrequest = arp_rtrequest;
+ ifa->ifa_flags |= RTF_CLONING;
+}
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h
index 147bee6844882..26c13c00ab021 100644
--- a/sys/netinet/if_ether.h
+++ b/sys/netinet/if_ether.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_ether.h 8.1 (Berkeley) 6/10/93
- * $Id: if_ether.h,v 1.4 1994/08/21 05:27:24 paul Exp $
+ * $Id: if_ether.h,v 1.5 1994/10/11 23:16:38 wollman Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@@ -154,6 +154,7 @@ void arpintr __P((void));
int arpresolve __P((struct arpcom *, struct rtentry *, struct mbuf *,
struct sockaddr *, u_char *, struct rtentry *));
void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
+void arp_ifinit __P((struct arpcom *, struct ifaddr *));
int ether_addmulti __P((struct ifreq *, struct arpcom *));
int ether_delmulti __P((struct ifreq *, struct arpcom *));
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 534348512f596..9aa8ddb4bbf4d 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.c 8.2 (Berkeley) 11/15/93
- * $Id: in.c,v 1.6 1994/10/02 17:48:37 phk Exp $
+ * $Id: in.c,v 1.7 1994/11/03 21:04:21 wollman Exp $
*/
#include <sys/param.h>
@@ -49,9 +49,7 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet/if_ether.h>
-#include <ether.h>
-#ifdef INET
/*
* Return the network number from an internet address.
*/
@@ -427,12 +425,6 @@ in_ifinit(ifp, ia, sin, scrub)
ia->ia_addr = oldaddr;
return (error);
}
-#if NETHER > 0
- if (ifp->if_output == ether_output) { /* XXX: Another Kludge */
- ia->ia_ifa.ifa_rtrequest = arp_rtrequest;
- ia->ia_ifa.ifa_flags |= RTF_CLONING;
- }
-#endif
splx(s);
if (scrub) {
ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;
@@ -631,4 +623,3 @@ in_delmulti(inm)
}
splx(s);
}
-#endif
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index 45cb17622b142..b858b3f058006 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -863,7 +863,7 @@ tulip_ioctl(
((struct arpcom *)ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
tulip_addr_filter(sc); /* reset multicast filtering */
(*ifp->if_init)(ifp->if_unit);
- arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr);
+ arp_ifinit((struct arpcom *)ifp, ifa);
break;
}
#endif /* INET */
@@ -1108,7 +1108,7 @@ tulip_pci_attach(
return;
}
- bzero(sc, sizeof(*sc)); /* Zero out the softc*/
+ bzero(sc, sizeof(sc)); /* Zero out the softc*/
sc->tulip_rxspace = vm_page_alloc_contig(TULIP_RXSPACE + NBPG, 0, 0xffffffff, PAGE_SIZE);
/*
* We've allocated an extra page of receive space so we can double map