141edb306SCy Schubert 241edb306SCy Schubert /* 341edb306SCy Schubert * Copyright (C) 2012 by Darren Reed. 441edb306SCy Schubert * 541edb306SCy Schubert * See the IPFILTER.LICENCE file for details on licencing. 641edb306SCy Schubert * 741edb306SCy Schubert * $Id$ 841edb306SCy Schubert */ 941edb306SCy Schubert 1041edb306SCy Schubert #ifdef IPFILTER_SCAN 1141edb306SCy Schubert 1241edb306SCy Schubert #include <ctype.h> 1341edb306SCy Schubert #include <stdio.h> 1441edb306SCy Schubert #include "ipf.h" 1541edb306SCy Schubert #include "netinet/ip_scan.h" 1641edb306SCy Schubert 1741edb306SCy Schubert void printsbuf(char * buf)18*efeb8bffSCy Schubertprintsbuf(char *buf) 1941edb306SCy Schubert { 2041edb306SCy Schubert u_char *s; 2141edb306SCy Schubert int i; 2241edb306SCy Schubert 2341edb306SCy Schubert for (s = (u_char *)buf, i = ISC_TLEN; i; i--, s++) { 2441edb306SCy Schubert if (ISPRINT(*s)) 2541edb306SCy Schubert putchar(*s); 2641edb306SCy Schubert else 2741edb306SCy Schubert PRINTF("\\%o", *s); 2841edb306SCy Schubert } 2941edb306SCy Schubert } 3041edb306SCy Schubert #else 3141edb306SCy Schubert void printsbuf(char *buf); 3241edb306SCy Schubert printsbuf(char * buf)33*efeb8bffSCy Schubertvoid printsbuf(char *buf) 3441edb306SCy Schubert { 3541edb306SCy Schubert #if 0 3641edb306SCy Schubert buf = buf; /* gcc -Wextra */ 3741edb306SCy Schubert #endif 3841edb306SCy Schubert } 3941edb306SCy Schubert #endif 40