-/* $OpenBSD: if_ether.c,v 1.244 2021/04/23 21:47:32 bluhm Exp $ */
+/* $OpenBSD: if_ether.c,v 1.245 2021/04/23 21:55:36 bluhm Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
LIST_HEAD(, llinfo_arp) arp_list;
struct pool arp_pool; /* pool for llinfo_arp structures */
int arp_maxtries = 5;
-int arpinit_done;
int la_hold_total;
#ifdef NFSCLIENT
void
arptimer(void *arg)
{
- struct timeout *to = (struct timeout *)arg;
+ struct timeout *to = arg;
struct llinfo_arp *la, *nla;
NET_LOCK();
}
void
-arp_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
+arpinit(void)
{
- struct sockaddr *gate = rt->rt_gateway;
- struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo;
+ static struct timeout arptimer_to;
- if (!arpinit_done) {
- static struct timeout arptimer_to;
+ pool_init(&arp_pool, sizeof(struct llinfo_arp), 0,
+ IPL_SOFTNET, 0, "arp", NULL);
- arpinit_done = 1;
- pool_init(&arp_pool, sizeof(struct llinfo_arp), 0,
- IPL_SOFTNET, 0, "arp", NULL);
+ timeout_set_proc(&arptimer_to, arptimer, &arptimer_to);
+ timeout_add_sec(&arptimer_to, arpt_prune);
+}
- timeout_set_proc(&arptimer_to, arptimer, &arptimer_to);
- timeout_add_sec(&arptimer_to, arpt_prune);
- }
+void
+arp_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
+{
+ struct sockaddr *gate = rt->rt_gateway;
+ struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo;
if (ISSET(rt->rt_flags,
RTF_GATEWAY|RTF_BROADCAST|RTF_MULTICAST|RTF_MPLS))
-/* $OpenBSD: if_ether.h,v 1.81 2021/03/10 10:21:48 jsg Exp $ */
+/* $OpenBSD: if_ether.h,v 1.82 2021/04/23 21:55:36 bluhm Exp $ */
/* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */
/*
int revarpwhoarewe(struct ifnet *, struct in_addr *, struct in_addr *);
int revarpwhoami(struct in_addr *, struct ifnet *);
+void arpinit(void);
void arpinput(struct ifnet *, struct mbuf *);
void arprequest(struct ifnet *, u_int32_t *, u_int32_t *, u_int8_t *);
void arpwhohas(struct arpcom *, struct in_addr *);
-/* $OpenBSD: ip_input.c,v 1.357 2021/04/23 21:47:32 bluhm Exp $ */
+/* $OpenBSD: ip_input.c,v 1.358 2021/04/23 21:55:36 bluhm Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
mq_init(&ipsend_mq, 64, IPL_SOFTNET);
mq_init(&ipsendraw_mq, 64, IPL_SOFTNET);
+ arpinit();
#ifdef IPSEC
ipsec_init();
#endif