summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKlemens Nanni <kn@cvs.openbsd.org>2022-11-23 14:51:01 +0000
committerKlemens Nanni <kn@cvs.openbsd.org>2022-11-23 14:51:01 +0000
commitb07371699bea843c9b5e790589f92d0f23b9244b (patch)
tree26116556d34bc131f3610273f4391d6788c8c083 /sys
parentb9a82163fdae053a989b25a50e0ed0acfa1286c9 (diff)
Remove unused struct ifnet's *if_afdata[] and struct domain's dom_if{at,de}tach()
Both made obsolete through struct ifnet's previous *if_nd addition. IPv6 Neighbour Discovery handles per-interface data directly, nothing else uses this generic domain API anymore. Outside of _KERNEL, but nothing in base uses them, either. OK bluhm mvs claudio
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c29
-rw-r--r--sys/net/if_var.h3
-rw-r--r--sys/sys/domain.h5
3 files changed, 3 insertions, 34 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 36ac89ceb46..70f873b447d 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.681 2022/11/23 14:48:27 kn Exp $ */
+/* $OpenBSD: if.c,v 1.682 2022/11/23 14:50:59 kn Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -133,7 +133,6 @@
#include <sys/device.h>
void if_attachsetup(struct ifnet *);
-void if_attachdomain(struct ifnet *);
void if_attach_common(struct ifnet *);
void if_remove(struct ifnet *);
int if_createrdomain(int, struct ifnet *);
@@ -460,7 +459,6 @@ if_attachsetup(struct ifnet *ifp)
if_addgroup(ifp, IFG_ALL);
- if_attachdomain(ifp);
#ifdef INET6
ifp->if_nd = nd6_ifattach(ifp);
#endif
@@ -538,25 +536,6 @@ if_free_sadl(struct ifnet *ifp)
}
void
-if_attachdomain(struct ifnet *ifp)
-{
- const struct domain *dp;
- int i, s;
-
- s = splnet();
-
- /* address family dependent data region */
- bzero(ifp->if_afdata, sizeof(ifp->if_afdata));
- for (i = 0; (dp = domains[i]) != NULL; i++) {
- if (dp->dom_ifattach)
- ifp->if_afdata[dp->dom_family] =
- (*dp->dom_ifattach)(ifp);
- }
-
- splx(s);
-}
-
-void
if_attachhead(struct ifnet *ifp)
{
if_attach_common(ifp);
@@ -1058,7 +1037,6 @@ if_detach(struct ifnet *ifp)
{
struct ifaddr *ifa;
struct ifg_list *ifg;
- const struct domain *dp;
int i, s;
/* Undo pseudo-driver changes. */
@@ -1126,11 +1104,6 @@ if_detach(struct ifnet *ifp)
KASSERT(TAILQ_EMPTY(&ifp->if_linkstatehooks));
KASSERT(TAILQ_EMPTY(&ifp->if_detachhooks));
- for (i = 0; (dp = domains[i]) != NULL; i++) {
- if (dp->dom_ifdetach && ifp->if_afdata[dp->dom_family])
- (*dp->dom_ifdetach)(ifp,
- ifp->if_afdata[dp->dom_family]);
- }
#ifdef INET6
nd6_ifdetach(ifp->if_nd);
#endif
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index eeb2aa8ba4a..fc7512c0974 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_var.h,v 1.121 2022/11/23 14:48:27 kn Exp $ */
+/* $OpenBSD: if_var.h,v 1.122 2022/11/23 14:50:59 kn Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -186,7 +186,6 @@ struct ifnet { /* and the entries */
struct sockaddr_dl *if_sadl; /* [N] pointer to our sockaddr_dl */
- void *if_afdata[AF_MAX];
struct nd_ifinfo *if_nd; /* [I] IPv6 Neighour Discovery info */
};
#define if_mtu if_data.ifi_mtu
diff --git a/sys/sys/domain.h b/sys/sys/domain.h
index d8758fb8b9c..478bc193d7a 100644
--- a/sys/sys/domain.h
+++ b/sys/sys/domain.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: domain.h,v 1.22 2021/05/25 22:45:10 bluhm Exp $ */
+/* $OpenBSD: domain.h,v 1.23 2022/11/23 14:50:59 kn Exp $ */
/* $NetBSD: domain.h,v 1.10 1996/02/09 18:25:07 christos Exp $ */
/*
@@ -60,9 +60,6 @@ struct domain {
unsigned int dom_sasize; /* size of sockaddr structure */
unsigned int dom_rtoffset; /* offset of the key, in bytes */
unsigned int dom_maxplen; /* maximum prefix length, in bits */
- void *(*dom_ifattach)(struct ifnet *);
- void (*dom_ifdetach)(struct ifnet *, void *);
- /* af-dependent data on ifnet */
};
#ifdef _KERNEL