From b358e4a2ae4a9029691b46debef5a1cbc1968727 Mon Sep 17 00:00:00 2001 From: veego Date: Thu, 11 May 2000 19:49:13 +0000 Subject: [PATCH] Import IP Filter 3.4.2 --- dist/ipf/common.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/dist/ipf/common.c b/dist/ipf/common.c index f09870632d7e..dd37a474d1f5 100644 --- a/dist/ipf/common.c +++ b/dist/ipf/common.c @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.1.1.1 2000/05/03 10:55:30 veego Exp $ */ +/* $NetBSD: common.c,v 1.1.1.2 2000/05/11 19:49:13 veego Exp $ */ /* * Copyright (C) 1993-2000 by Darren Reed. @@ -576,3 +576,22 @@ frpcmp_t *frp; printf(" port %s %s", pcmp1[frp->frp_cmp], portname(pr, frp->frp_port)); } + + +void printbuf(buf, len, zend) +char *buf; +int len, zend; +{ + char *s, c; + int i; + + for (s = buf, i = len; i; i--) { + c = *s++; + if (isprint(c)) + putchar(c); + else + printf("\\%03o", c); + if ((c == '\0') && zend) + break; + } +}