Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / cmd / ipf / lib / common / binprint.c
blobb07dfb0d7c95d227940cd397680bef9d3bdc487e
1 /*
2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * $Id: binprint.c,v 1.8 2002/05/14 15:18:56 darrenr Exp $
7 */
9 #include "ipf.h"
12 void binprint(ptr, size)
13 void *ptr;
14 size_t size;
16 u_char *s;
17 int i, j;
19 for (i = size, j = 0, s = (u_char *)ptr; i; i--, s++) {
20 j++;
21 printf("%02x ", *s);
22 if (j == 16) {
23 printf("\n");
24 j = 0;
27 putchar('\n');
28 (void)fflush(stdout);