1145519Sdarrenr/* $FreeBSD$ */ 2145510Sdarrenr 3145510Sdarrenr/* 4255332Scy * Copyright (C) 2012 by Darren Reed. 5145510Sdarrenr * 6145510Sdarrenr * See the IPFILTER.LICENCE file for details on licencing. 7145510Sdarrenr * 8255332Scy * $Id$ 9145510Sdarrenr */ 10145510Sdarrenr 11145510Sdarrenr#include "ipf.h" 12145510Sdarrenr 13145510Sdarrenr 14255332Scyvoid 15255332Scyprintportcmp(pr, frp) 16255332Scy int pr; 17255332Scy frpcmp_t *frp; 18145510Sdarrenr{ 19145510Sdarrenr static char *pcmp1[] = { "*", "=", "!=", "<", ">", "<=", ">=", 20145510Sdarrenr "<>", "><", ":" }; 21145510Sdarrenr 22145510Sdarrenr if (frp->frp_cmp == FR_INRANGE || frp->frp_cmp == FR_OUTRANGE) 23255332Scy PRINTF(" port %d %s %d", frp->frp_port, 24145510Sdarrenr pcmp1[frp->frp_cmp], frp->frp_top); 25145510Sdarrenr else if (frp->frp_cmp == FR_INCRANGE) 26255332Scy PRINTF(" port %d:%d", frp->frp_port, frp->frp_top); 27145510Sdarrenr else 28255332Scy PRINTF(" port %s %s", pcmp1[frp->frp_cmp], 29145510Sdarrenr portname(pr, frp->frp_port)); 30145510Sdarrenr} 31