diff options
Diffstat (limited to 'sys/net/if_media.c')
| -rw-r--r-- | sys/net/if_media.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/net/if_media.c b/sys/net/if_media.c index ee1288068abc..553af923040b 100644 --- a/sys/net/if_media.c +++ b/sys/net/if_media.c @@ -1,5 +1,5 @@ /* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */ -/* $Id: if_media.c,v 1.5 1998/02/06 12:13:48 eivind Exp $ */ +/* $Id: if_media.c,v 1.6 1998/02/09 06:09:54 eivind Exp $ */ /* * Copyright (c) 1997 @@ -89,6 +89,19 @@ ifmedia_init(ifm, dontcare_mask, change_callback, status_callback) ifm->ifm_status = status_callback; } +void +ifmedia_removeall(ifm) + struct ifmedia *ifm; +{ + struct ifmedia_entry *entry; + + for (entry = LIST_FIRST(&ifm->ifm_list); entry; + entry = LIST_FIRST(&ifm->ifm_list)) { + LIST_REMOVE(entry, ifm_list); + free(entry, M_IFADDR); + } +} + /* * Add a media configuration to the list of supported media * for a specific interface instance. |
