mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 17:10:36 +00:00
efeb8bffe3
Convert ipfilter userland function declarations from K&R to ANSI. This syncs our function declarations with NetBSD hg commit 75edcd7552a0 (apply our changes). Though not copied from NetBSD, this change was partially inspired by NetBSD's work and inspired by style(9). Reviewed by: glebius (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33595
29 lines
621 B
C
29 lines
621 B
C
/* $FreeBSD$ */
|
|
|
|
/*
|
|
* Copyright (C) 2012 by Darren Reed.
|
|
*
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#include "ipf.h"
|
|
|
|
|
|
void
|
|
printportcmp(int pr, frpcmp_t *frp)
|
|
{
|
|
static char *pcmp1[] = { "*", "=", "!=", "<", ">", "<=", ">=",
|
|
"<>", "><", ":" };
|
|
|
|
if (frp->frp_cmp == FR_INRANGE || frp->frp_cmp == FR_OUTRANGE)
|
|
PRINTF(" port %d %s %d", frp->frp_port,
|
|
pcmp1[frp->frp_cmp], frp->frp_top);
|
|
else if (frp->frp_cmp == FR_INCRANGE)
|
|
PRINTF(" port %d:%d", frp->frp_port, frp->frp_top);
|
|
else
|
|
PRINTF(" port %s %s", pcmp1[frp->frp_cmp],
|
|
portname(pr, frp->frp_port));
|
|
}
|