OpenSolaris_b135/cmd/ipf/lib/common/printsbuf.c

Compare this file to the similar file:
Show the results in this format:

/*
 * Copyright (C) 1993-2005  by Darren Reed.
 * See the IPFILTER.LICENCE file for details on licencing.
 */ 

#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