2004-11-13 22:14:48 +03:00
|
|
|
/* $NetBSD: printsbuf.c,v 1.2 2004/11/13 19:16:10 he Exp $ */
|
2004-03-28 12:55:20 +04:00
|
|
|
|
|
|
|
#ifdef IPFILTER_SCAN
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "ipf.h"
|
|
|
|
#include "netinet/ip_scan.h"
|
|
|
|
|
|
|
|
void printsbuf(buf)
|
|
|
|
char *buf;
|
|
|
|
{
|
|
|
|
u_char *s;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (s = (u_char *)buf, i = ISC_TLEN; i; i--, s++) {
|
2004-11-13 22:14:48 +03:00
|
|
|
if (ISPRINT(*s))
|
2004-03-28 12:55:20 +04:00
|
|
|
putchar(*s);
|
|
|
|
else
|
|
|
|
printf("\\%o", *s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|