K 10 svn:author V 6 emaste K 8 svn:date V 27 2006-01-03T22:42:58.000000Z K 7 svn:log V 1632 Merge link layer mutlicast address list locking from HEAD to RELENG_5, with a few changes to preserve ABI compatibility. if_var.h:1.100: Add if_addr_mtx, a mutex to protect ifnet-related address lists. Add accessor macros. Unlike FreeBSD 6 and HEAD, share a global mutex (instead of putting it in struct ifnet) to maintain ABI backwards compatibility. if_var.h:1.101: - Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx. Staticize. if.c:1.239: Protect link layer network interface multicast address list manipulation using (global) if_addr_mtx: - Initialize if_addr_mtx in if_init(). - Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx. Staticize. - Extract ifmultiaddr allocation and initialization into if_allocmulti(); accept a 'mflags' argument to indicate whether or not sleeping is permitted. This centralizes error handling and address duplication. - Extract ifmultiaddr tear-down and deallocation in if_freemulti(). - Re-structure if_addmulti() to hold if_addr_mtx around manipulation of the ifnet multicast address list and reference count manipulation. Make use of non-sleeping allocations. Annotate the fact that we only generate routing socket events for explicit address addition, not implicit link layer address addition. - Re-structure if_delmulti() to hold if_addr_mtx around manipulation of the ifnet multicast address list and reference count manipulation. Annotate the lack of a routing socket event for implicit link layer address removal. - De-spl all and sundry. Approved by: rwatson (mentor) END