summaryrefslogtreecommitdiffstats
path: root/bsd_eth_drivers/libbsdport/ifmedia.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd_eth_drivers/libbsdport/ifmedia.c')
-rw-r--r--bsd_eth_drivers/libbsdport/ifmedia.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bsd_eth_drivers/libbsdport/ifmedia.c b/bsd_eth_drivers/libbsdport/ifmedia.c
index 77c3bd3..dc85dfd 100644
--- a/bsd_eth_drivers/libbsdport/ifmedia.c
+++ b/bsd_eth_drivers/libbsdport/ifmedia.c
@@ -50,6 +50,16 @@ struct ifmedia_entry *ifmen, *ifmep, *ifme;
}
}
+void
+ifmedia_removeall(struct ifmedia *ifm)
+{
+struct ifmedia_entry *ifmen, *ifmep;
+ for ( ifmep = LIST_FIRST(&ifm->ifm_list); ifmep; ifmep = ifmen ) {
+ ifmen = LIST_NEXT(ifmep, ifm_list);
+ free(ifmep, M_DEVBUF);
+ }
+}
+
int
ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, struct ifmedia *ifm, u_long cmd)
{