1/*
2 * Copyright (C) 2012 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 */
6
7#include "ipf.h"
8#include <ctype.h>
9
10
11void
12printdstlistdata(pool, opts)
13	ippool_dst_t *pool;
14	int opts;
15{
16
17	if ((opts & OPT_DEBUG) == 0) {
18		if ((pool->ipld_flags & IPDST_DELETE) != 0)
19			PRINTF("# ");
20		PRINTF("pool ");
21	} else {
22		if ((pool->ipld_flags & IPDST_DELETE) != 0)
23			PRINTF("# ");
24		PRINTF("Name: %s\tRole: ", pool->ipld_name);
25	}
26
27	printunit(pool->ipld_unit);
28
29	if ((opts & OPT_DEBUG) == 0) {
30		PRINTF("/dstlist (name %s;", pool->ipld_name);
31		if (pool->ipld_policy != IPLDP_NONE) {
32			PRINTF(" policy ");
33			printdstlistpolicy(pool->ipld_policy);
34			putchar(';');
35		}
36		PRINTF(")\n");
37	} else {
38		putchar(' ');
39
40		PRINTF("\tReferences: %d\n", pool->ipld_ref);
41		if ((pool->ipld_flags & IPDST_DELETE) != 0)
42			PRINTF("# ");
43		PRINTF("Policy: \n");
44		printdstlistpolicy(pool->ipld_policy);
45		PRINTF("\n\tNodes Starting at %p\n", pool->ipld_dests);
46	}
47}
48