add UNLEASHED_OBJ to unleashed.mk
[unleashed/tickless.git] / usr / src / cmd / ipf / lib / common / printportcmp.c
blobb1ecd366f7e3b0b83f95ca1003f8ed65f39d5587
1 /*
2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * $Id: printportcmp.c,v 1.7 2003/02/16 02:31:05 darrenr Exp $
7 */
9 #include "ipf.h"
12 void printportcmp(pr, frp)
13 int pr;
14 frpcmp_t *frp;
16 static char *pcmp1[] = { "*", "=", "!=", "<", ">", "<=", ">=",
17 "<>", "><", ":" };
19 if (frp->frp_cmp == FR_INRANGE || frp->frp_cmp == FR_OUTRANGE)
20 printf(" port %d %s %d", frp->frp_port,
21 pcmp1[frp->frp_cmp], frp->frp_top);
22 else if (frp->frp_cmp == FR_INCRANGE)
23 printf(" port %d:%d", frp->frp_port, frp->frp_top);
24 else
25 printf(" port %s %s", pcmp1[frp->frp_cmp],
26 portname(pr, frp->frp_port));