xref: /titanic_41/usr/src/cmd/ipf/lib/common/printsbuf.c (revision 1816cb7076d3ec8a78ef9ac9f895574e13c43645)
1 /*
2  * Copyright (C) 1993-2005  by Darren Reed.
3  * See the IPFILTER.LICENCE file for details on licencing.
4  */
5 
6 #ifdef	IPFILTER_SCAN
7 
8 #include <ctype.h>
9 #include <stdio.h>
10 #include "ipf.h"
11 #include "netinet/ip_scan.h"
12 
13 void printsbuf(buf)
14 char *buf;
15 {
16 	u_char *s;
17 	int i;
18 
19 	for (s = (u_char *)buf, i = ISC_TLEN; i; i--, s++) {
20 		if (ISPRINT(*s))
21 			putchar(*s);
22 		else
23 			printf("\\%o", *s);
24 	}
25 }
26 
27 #endif
28