summaryrefslogtreecommitdiff
path: root/sys/net/if_ethersubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_ethersubr.c')
-rw-r--r--sys/net/if_ethersubr.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index e7b8b53e452..78ecef3d472 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.28 1999/02/26 17:01:32 jason Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.29 1999/08/08 00:43:00 niklas Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -808,6 +808,20 @@ ether_ifattach(ifp)
LIST_INIT(&((struct arpcom *)ifp)->ac_multiaddrs);
}
+void
+ether_ifdetach(ifp)
+ struct ifnet *ifp;
+{
+ struct arpcom *ac = (struct arpcom *)ifp;
+ struct ether_multi *enm;
+
+ for (enm = LIST_FIRST(&ac->ac_multiaddrs); enm;
+ enm = LIST_FIRST(&ac->ac_multiaddrs)) {
+ LIST_REMOVE(enm, enm_list);
+ free(enm, M_IFMADDR);
+ }
+}
+
u_char ether_ipmulticast_min[6] = { 0x01, 0x00, 0x5e, 0x00, 0x00, 0x00 };
u_char ether_ipmulticast_max[6] = { 0x01, 0x00, 0x5e, 0x7f, 0xff, 0xff };