diff options
author | guido <guido@FreeBSD.org> | 2005-12-30 11:52:26 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 2005-12-30 11:52:26 +0000 |
commit | 7ee09247502caaf9063c5d6ba733231a70de09ef (patch) | |
tree | 9209f38a8bc3af0186363bc8bbfe05d79337f8d4 /contrib/ipfilter/lib/printfr.c | |
parent | 3cc29e6ebff10906cf1f84a6cc2d518dcecf219c (diff) | |
download | FreeBSD-src-7ee09247502caaf9063c5d6ba733231a70de09ef.zip FreeBSD-src-7ee09247502caaf9063c5d6ba733231a70de09ef.tar.gz |
Resolve conflicts (and believe me...you don't want to know).
Diffstat (limited to 'contrib/ipfilter/lib/printfr.c')
-rw-r--r-- | contrib/ipfilter/lib/printfr.c | 57 |
1 files changed, 44 insertions, 13 deletions
diff --git a/contrib/ipfilter/lib/printfr.c b/contrib/ipfilter/lib/printfr.c index a7ab1d2..fb26795 100644 --- a/contrib/ipfilter/lib/printfr.c +++ b/contrib/ipfilter/lib/printfr.c @@ -5,7 +5,7 @@ * * See the IPFILTER.LICENCE file for details on licencing. * - * Id: printfr.c,v 1.43.2.10 2005/03/16 15:38:13 darrenr Exp + * $Id: printfr.c,v 1.43.2.15 2005/11/14 17:45:06 darrenr Exp $ */ #include "ipf.h" @@ -22,7 +22,7 @@ u_32_t *addr, *mask; switch (type) { case FRI_BROADCAST : - suffix = "/bcast"; + suffix = "bcast"; break; case FRI_DYNAMIC : @@ -32,15 +32,15 @@ u_32_t *addr, *mask; break; case FRI_NETWORK : - suffix = "/net"; + suffix = "net"; break; case FRI_NETMASKED : - suffix = "/netmasked"; + suffix = "netmasked"; break; case FRI_PEERADDR : - suffix = "/peer"; + suffix = "peer"; break; case FRI_LOOKUP : @@ -107,6 +107,9 @@ ioctlfunc_t iocfunc; if ((fp->fr_type & FR_T_BUILTIN) != 0) printf("# Builtin: "); + if (fp->fr_collect != 0) + printf("%u ", fp->fr_collect); + if (fp->fr_type == FR_T_CALLFUNC) { ; } else if (fp->fr_func != NULL) { @@ -189,12 +192,11 @@ ioctlfunc_t iocfunc; if (*fp->fr_ifnames[2]) { printifname("", fp->fr_ifnames[2], fp->fr_ifas[2]); - putchar(' '); - if (*fp->fr_ifnames[3]) { printifname(",", fp->fr_ifnames[3], fp->fr_ifas[3]); } + putchar(' '); } } @@ -208,10 +210,10 @@ ioctlfunc_t iocfunc; pr = -1; } else if (fp->fr_mip.fi_p) { pr = fp->fr_ip.fi_p; - if ((p = getprotobynumber(fp->fr_proto))) - printf("proto %s ", p->p_name); - else - printf("proto %d ", fp->fr_proto); + p = getprotobynumber(pr); + printf("proto "); + printproto(p, pr, NULL); + putchar(' '); } } @@ -370,6 +372,35 @@ ioctlfunc_t iocfunc; if (!(fp->fr_flx & FI_OOW)) printf("not "); printf("oow"); + comma = ","; + } + if (fp->fr_mflx & FI_MBCAST) { + fputs(comma, stdout); + if (!(fp->fr_flx & FI_MBCAST)) + printf("not "); + printf("mbcast"); + comma = ","; + } + if (fp->fr_mflx & FI_BROADCAST) { + fputs(comma, stdout); + if (!(fp->fr_flx & FI_BROADCAST)) + printf("not "); + printf("bcast"); + comma = ","; + } + if (fp->fr_mflx & FI_MULTICAST) { + fputs(comma, stdout); + if (!(fp->fr_flx & FI_MULTICAST)) + printf("not "); + printf("mcast"); + comma = ","; + } + if (fp->fr_mflx & FI_STATE) { + fputs(comma, stdout); + if (!(fp->fr_flx & FI_STATE)) + printf("not "); + printf("state"); + comma = ","; } } @@ -410,8 +441,8 @@ ioctlfunc_t iocfunc; if (fp->fr_flags & (FR_FRSTRICT)) { printf(" ("); if (fp->fr_flags & FR_FRSTRICT) - printf(" strict"); - printf(" )"); + printf("strict"); + printf(")"); } } |