Import IP Filter 3.4.2
This commit is contained in:
parent
8db28cd918
commit
b358e4a2ae
21
dist/ipf/common.c
vendored
21
dist/ipf/common.c
vendored
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user