summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ipf/lib/common/printlookup.c
blob: ffc822e595509f0303118638c30c8ae2bc325d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Copyright (C) 2005 by Darren Reed.
 *
 * See the IPFILTER.LICENCE file for details on licencing.
 *
 */

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#include "ipf.h"


void printlookup(addr, mask)
	i6addr_t *addr, *mask;
{
	switch (addr->iplookuptype)
	{
	case IPLT_POOL :
		printf("pool/");
		break;
	case IPLT_HASH :
		printf("hash/");
		break;
	default :
		printf("lookup(%x)=", addr->iplookuptype);
		break;
	}

	printf("%u", addr->iplookupnum);
	if (opts & OPT_UNDEF) {
		if (mask->iplookupptr == NULL)
			printf("(!)");
	}
}