]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/lib/printsbuf.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / lib / printsbuf.c
1 /*      $FreeBSD$       */
2
3 /*
4  * Copyright (C) 2002-2004 by Darren Reed.
5  * 
6  * See the IPFILTER.LICENCE file for details on licencing.  
7  *   
8  * $Id: printsbuf.c,v 1.2.4.2 2006/06/16 17:21:14 darrenr Exp $ 
9  */     
10
11 #ifdef  IPFILTER_SCAN
12
13 #include <ctype.h>
14 #include <stdio.h>
15 #include "ipf.h"
16 #include "netinet/ip_scan.h"
17
18 void printsbuf(buf)
19 char *buf;
20 {
21         u_char *s;
22         int i;
23
24         for (s = (u_char *)buf, i = ISC_TLEN; i; i--, s++) {
25                 if (ISPRINT(*s))
26                         putchar(*s);
27                 else
28                         printf("\\%o", *s);
29         }
30 }
31
32 #endif