printsbuf.c revision 145519
1/* $FreeBSD: head/contrib/ipfilter/lib/printsbuf.c 145519 2005-04-25 18:20:15Z darrenr $ */ 2 3#ifdef IPFILTER_SCAN 4 5#include <ctype.h> 6#include <stdio.h> 7#include "ipf.h" 8#include "netinet/ip_scan.h" 9 10void printsbuf(buf) 11char *buf; 12{ 13 u_char *s; 14 int i; 15 16 for (s = (u_char *)buf, i = ISC_TLEN; i; i--, s++) { 17 if (ISPRINT(*s)) 18 putchar(*s); 19 else 20 printf("\\%o", *s); 21 } 22} 23 24#endif 25