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