summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/printsbuf.c
blob: cfa9171d1f4a7f34644e10dc1cf53a3bd7cbcc34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*	$FreeBSD$	*/

#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++) {
		if (ISPRINT(*s))
			putchar(*s);
		else
			printf("\\%o", *s);
	}
}

#endif
OpenPOWER on IntegriCloud