/* if pcr == z then z- else if min == x && pcr == - then x+ else if max == y then y- else *  */
int atm_pcr_goal(const struct atm_trafprm *tp)
/* if pcr == z then z- else if min == x && pcr == - then x+ else if max == y then y- else *  */
int atm_pcr_goal(const struct atm_trafprm *tp)
{
	if (tp->pcr && tp->pcr != ATM_MAX_PCR)
		return -tp->pcr;
	if (tp->min_pcr && !tp->pcr)
		return tp->min_pcr;
	if (tp->max_pcr != ATM_MAX_PCR)
		return -tp->max_pcr;
	return 0;
}