xref: /illumos-gate/usr/src/cmd/ipf/lib/printlookup.c (revision 7a87437fd36d10a97e4d5952dba549b6f0fadbfc)
1 /*
2  * Copyright (C) 2005 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  */
7 
8 #include "ipf.h"
9 
10 
11 void printlookup(addr, mask)
12 	i6addr_t *addr, *mask;
13 {
14 	switch (addr->iplookuptype)
15 	{
16 	case IPLT_POOL :
17 		printf("pool/");
18 		break;
19 	case IPLT_HASH :
20 		printf("hash/");
21 		break;
22 	default :
23 		printf("lookup(%x)=", addr->iplookuptype);
24 		break;
25 	}
26 
27 	printf("%u", addr->iplookupnum);
28 	if (opts & OPT_UNDEF) {
29 		if (mask->iplookupptr == NULL)
30 			printf("(!)");
31 	}
32 }
33