aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1998-06-12 03:48:19 +0000
committerJulian Elischer <julian@FreeBSD.org>1998-06-12 03:48:19 +0000
commited7509ace472df6920d5f272cd966f74e6dab7ab (patch)
tree14c5e57761857a3a0040e03b38cb34c8de013d9a /sys/netinet/if_ether.c
parent0cab75363d5b8c14b1133f91b59552b1195a45f3 (diff)
downloadsrc-ed7509ace472df6920d5f272cd966f74e6dab7ab.tar.gz
src-ed7509ace472df6920d5f272cd966f74e6dab7ab.zip
Go through the loopback code with a broom..
Remove lots'o'hacks. looutput is now static. Other callers who want to use loopback to allow shortcutting should call the special entrypoint for this, if_simloop(), which is specifically designed for this purpose. Using looutput for this purpose was problematic, particularly with bpf and trying to keep track of whether one should be using the charateristics of the loopback interface or the interface (e.g. if_ethersubr.c) that was requesting the loopback. There was a whole class of errors due to this mis-use each of which had hacks to cover them up. Consists largly of hack removal :-)
Notes
Notes: svn path=/head/; revision=36908
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index c744e7f10ee7..c3115ed62c21 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.45 1998/05/23 08:03:40 phk Exp $
+ * $Id: if_ether.c,v 1.46 1998/06/07 17:12:12 dfr Exp $
*/
/*
@@ -104,7 +104,8 @@ SYSCTL_INT(_net_link_ether_inet, OID_AUTO, proxyall, CTLFLAG_RW,
&arp_proxyall, 0, "");
static void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
-static void arprequest __P((struct arpcom *, u_int32_t *, u_int32_t *, u_char *));
+static void arprequest __P((struct arpcom *,
+ struct in_addr *, struct in_addr *, u_char *));
static void arpintr __P((void));
static void arptfree __P((struct llinfo_arp *));
static void arptimer __P((void *));
@@ -183,8 +184,8 @@ arp_rtrequest(req, rt, sa)
/* Announce a new entry if requested. */
if (rt->rt_flags & RTF_ANNOUNCE)
arprequest((struct arpcom *)rt->rt_ifp,
- &SIN(rt_key(rt))->sin_addr.s_addr,
- &SIN(rt_key(rt))->sin_addr.s_addr,
+ &SIN(rt_key(rt))->sin_addr,
+ &SIN(rt_key(rt))->sin_addr,
(u_char *)LLADDR(SDL(gate)));
/*FALLTHROUGH*/
case RTM_RESOLVE:
@@ -275,7 +276,7 @@ arp_rtrequest(req, rt, sa)
static void
arprequest(ac, sip, tip, enaddr)
register struct arpcom *ac;
- register u_int32_t *sip, *tip;
+ register struct in_addr *sip, *tip;
register u_char *enaddr;
{
register struct mbuf *m;
@@ -374,9 +375,8 @@ arpresolve(ac, rt, m, dst, desten, rt0)
rt->rt_expire = time_second;
if (la->la_asked++ < arp_maxtries)
arprequest(ac,
- &(SIN(rt->rt_ifa->ifa_addr)->sin_addr.s_addr),
- &(SIN(dst)->sin_addr.s_addr),
- ac->ac_enaddr);
+ &SIN(rt->rt_ifa->ifa_addr)->sin_addr,
+ &SIN(dst)->sin_addr, ac->ac_enaddr);
else {
rt->rt_flags |= RTF_REJECT;
rt->rt_expire += arpt_down;
@@ -642,8 +642,8 @@ arp_ifinit(ac, ifa)
struct ifaddr *ifa;
{
if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY)
- arprequest(ac, &(IA_SIN(ifa)->sin_addr.s_addr),
- &(IA_SIN(ifa)->sin_addr.s_addr), ac->ac_enaddr);
+ arprequest(ac, &IA_SIN(ifa)->sin_addr,
+ &IA_SIN(ifa)->sin_addr, ac->ac_enaddr);
ifa->ifa_rtrequest = arp_rtrequest;
ifa->ifa_flags |= RTF_CLONING;
}