struct pf_addr		*raddr = &rpool->cur->addr.v.a.addr; struct pf_addr		*rmask = &rpool->cur->addr.v.a.mask;
struct pf_addr		*raddr; struct pf_addr		*rmask; struct pf_pooladdr	*acur = rpool->cur;
pf_map_addr(u_int8_t af, struct pf_pool *rpool, struct pf_addr *saddr,    struct pf_addr *naddr, struct pf_addr *init_addr){	unsigned char		 hash[16];	struct pf_addr		*raddr = &rpool->cur->addr.v.a.addr;	struct pf_addr		*rmask = &rpool->cur->addr.v.a.mask;	if (rpool->cur->addr.type == PF_ADDR_NOROUTE ||	    rpool->cur->addr.type == PF_ADDR_TABLE)		return (1);	if (rpool->cur->addr.type == PF_ADDR_DYNIFTL &&	    rpool->cur->addr.p.dyn->undefined)		return (1);	switch (rpool->opts & PF_POOL_TYPEMASK) {	case PF_POOL_NONE:		PF_ACPY(naddr, raddr, af);		break;	case PF_POOL_BITMASK:		PF_POOLMASK(naddr, raddr, rmask, saddr, af);		break;	case PF_POOL_RANDOM:		if (init_addr != NULL && PF_AZERO(init_addr, af)) {			switch (af) {#ifdef INET			case AF_INET:				rpool->counter.addr32[0] = arc4random();				break;#endif /* INET */#ifdef INET6			case AF_INET6:				if (rmask->addr32[3] != 0xffffffff)					rpool->counter.addr32[3] = arc4random();				else					break;				if (rmask->addr32[2] != 0xffffffff)					rpool->counter.addr32[2] = arc4random();				else					break;				if (rmask->addr32[1] != 0xffffffff)					rpool->counter.addr32[1] = arc4random();				else					break;				if (rmask->addr32[0] != 0xffffffff)					rpool->counter.addr32[0] = arc4random();				break;#endif /* INET6 */			}			PF_POOLMASK(naddr, raddr, rmask, &rpool->counter, af);			PF_ACPY(init_addr, naddr, af);		} else {			PF_AINC(&rpool->counter, af);			PF_POOLMASK(naddr, raddr, rmask, &rpool->counter, af);		}		break;	case PF_POOL_SRCHASH:		pf_hash(saddr, (struct pf_addr *)&hash, &rpool->key, af);		PF_POOLMASK(naddr, raddr, rmask, (struct pf_addr *)&hash, af);		break;	case PF_POOL_ROUNDROBIN:		if (pf_match_addr(0, &rpool->cur->addr.v.a.addr,		    &rpool->cur->addr.v.a.mask, &rpool->counter, af)) {			PF_ACPY(naddr, &rpool->counter, af);			PF_AINC(&rpool->counter, af);		} else {			if ((rpool->cur =			    TAILQ_NEXT(rpool->cur, entries)) == NULL)				rpool->cur = TAILQ_FIRST(&rpool->list);			PF_ACPY(naddr, &rpool->cur->addr.v.a.addr, af);			PF_ACPY(&rpool->counter,			    &rpool->cur->addr.v.a.addr, af);			PF_AINC(&rpool->counter, af);		}		break;	}	if (pf_status.debug >= PF_DEBUG_MISC &&	    (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) {		printf("pf_map_addr: selected address: ");		pf_print_host(naddr, 0, af);		printf("\n");	}	return (0);}