summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-12-22 21:56:22 +0000
committerwollman <wollman@FreeBSD.org>1994-12-22 21:56:22 +0000
commite6ec63204feee711e761971002214c19f676007d (patch)
treedd986184c8951fb36a642ae622be3def3ec5b792 /sys/netinet
parentaabe5bb0c9a9c0d3f1b160f7a2922a7b96f696e3 (diff)
downloadFreeBSD-src-e6ec63204feee711e761971002214c19f676007d.zip
FreeBSD-src-e6ec63204feee711e761971002214c19f676007d.tar.gz
Move ARP interface initialization into if_ether.c:arp_ifinit().
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c13
-rw-r--r--sys/netinet/if_ether.h3
-rw-r--r--sys/netinet/in.c11
3 files changed, 15 insertions, 12 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 5790eb66..b2c22cf 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 147bee6..26c13c0 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 5343485..9aa8ddb 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
OpenPOWER on IntegriCloud