switch (id) { case PF_POOL_NAT_R: if (p1 != PF_NAT_PROXY_PORT_LOW || p2 != PF_NAT_PROXY_PORT_HIGH) { if (p1 == p2) printf(" port %u", p1); else printf(" port %u:%u", p1, p2); } break; case PF_POOL_RDR_R: if (p1) { printf(" port %u", ntohs(p1)); if (p2 & PF_RPORT_RANGE) printf(":*"); } break; case PF_POOL_RULE_RT: default: break; } switch (pool->opts & PF_POOL_TYPEMASK) { case PF_POOL_NONE: break; case PF_POOL_BITMASK: printf(" bitmask"); break; case PF_POOL_RANDOM: printf(" random"); break; case PF_POOL_SRCHASH: printf(" source-hash 0x%08X%08X%08X%08X", pool->key.key32[0], pool->key.key32[1], pool->key.key32[2], pool->key.key32[3]); break; case PF_POOL_ROUNDROBIN: printf(" round-robin"); break; } if (pool->opts & PF_POOL_STATICPORT) printf(" static-port");
print_pool(struct pf_pool *pool, sa_family_t af, int id){	struct pf_pooladdr *pooladdr;	if ((TAILQ_FIRST(&pool->list) != NULL) &&	    TAILQ_NEXT(TAILQ_FIRST(&pool->list), entries) != NULL)		printf("{ ");	TAILQ_FOREACH(pooladdr, &pool->list, entries){		switch (id) {		case PF_POOL_NAT_R:		case PF_POOL_RDR_R:			print_addr(&pooladdr->addr, af);			break;		case PF_POOL_RULE_RT:			if (PF_AZERO(&pooladdr->addr.addr, af))				printf("%s", pooladdr->ifname);			else {				printf("(%s ", pooladdr->ifname);				print_addr(&pooladdr->addr, af);				printf(")");			}			break;		}		if (TAILQ_NEXT(pooladdr, entries) != NULL)			printf(", ");		else if (TAILQ_NEXT(TAILQ_FIRST(&pool->list), entries) != NULL)			printf(" }");	}}