FreeBSD/sys/netinet/in.c
/*
 * Removes either all lle entries for given @ia, or lle
 * corresponding to @ia address.
 */
Removes either all lle entries for given @ia, or lle
corresponding to @ia address.
Removes either all lle entries for given @ia or lle corresponding to @ia address .
static void
in_scrubprefixlle(struct in_ifaddr *ia, int all, u_int flags)
{
	struct sockaddr_in addr, mask;
	struct sockaddr *saddr, *smask;
	struct ifnet *ifp;
	saddr = (struct sockaddr *)&addr;
	bzero(&addr, sizeof(addr));
	addr.sin_len = sizeof(addr);
	addr.sin_family = AF_INET;
	smask = (struct sockaddr *)&mask;
	bzero(&mask, sizeof(mask));
	mask.sin_len = sizeof(mask);
	mask.sin_family = AF_INET;
	mask.sin_addr.s_addr = ia->ia_subnetmask;
	ifp = ia->ia_ifp;
	if (all) {
		addr.sin_addr.s_addr = ntohl(ia->ia_addr.sin_addr.s_addr);
		lltable_prefix_free(AF_INET, saddr, smask, flags);
	} else {
		addr.sin_addr.s_addr = ia->ia_addr.sin_addr.s_addr;
		lltable_delete_addr(LLTABLE(ifp), LLE_IFADDR, saddr);
	}
}
static void in_scrubprefixlle ( struct in_ifaddr * ia , int all , u_int flags ) { struct sockaddr_in addr , mask ; struct sockaddr * saddr , * smask ; struct ifnet * ifp ; saddr = ( struct sockaddr * ) & addr ; bzero ( & addr , sizeof ( addr ) ) ; addr . sin_len = sizeof ( addr ) ; addr . sin_family = AF_INET ; smask = ( struct sockaddr * ) & mask ; bzero ( & mask , sizeof ( mask ) ) ; mask . sin_len = sizeof ( mask ) ; mask . sin_family = AF_INET ; mask . sin_addr . s_addr = ia -> ia_subnetmask ; ifp = ia -> ia_ifp ; if ( all ) { addr . sin_addr . s_addr = ntohl ( ia -> ia_addr . sin_addr . s_addr ) ; lltable_prefix_free ( AF_INET , saddr , smask , flags ) ; } else { addr . sin_addr . s_addr = ia -> ia_addr . sin_addr . s_addr ; lltable_delete_addr ( LLTABLE ( ifp ) , LLE_IFADDR , saddr ) ; } }
Removes either all lle entries for given @ia, or lle
 corresponding to @ia address.
Removes either all lle entries for given @ia or lle corresponding to @ia address .
/*
		 * Remove all L2 entries matching given prefix.
		 * Convert address to host representation to avoid
		 * doing this on every callback. ia_subnetmask is already
		 * stored in host representation.
		 */ /* Remove interface address only */