mirror of
https://github.com/Stichting-MINIX-Research-Foundation/netbsd.git
synced 2025-09-12 16:46:33 -04:00
50 lines
1.0 KiB
C
50 lines
1.0 KiB
C
/* $NetBSD: printdstlistdata.c,v 1.1.1.2 2012/07/22 13:44:40 darrenr Exp $ */
|
|
|
|
/*
|
|
* Copyright (C) 2012 by Darren Reed.
|
|
*
|
|
* See the IPFILTER.LICENCE file for details on licencing.
|
|
*/
|
|
|
|
#include "ipf.h"
|
|
#include <ctype.h>
|
|
|
|
|
|
void
|
|
printdstlistdata(pool, opts)
|
|
ippool_dst_t *pool;
|
|
int opts;
|
|
{
|
|
|
|
if ((opts & OPT_DEBUG) == 0) {
|
|
if ((pool->ipld_flags & IPDST_DELETE) != 0)
|
|
PRINTF("# ");
|
|
PRINTF("pool ");
|
|
} else {
|
|
if ((pool->ipld_flags & IPDST_DELETE) != 0)
|
|
PRINTF("# ");
|
|
PRINTF("Name: %s\tRole: ", pool->ipld_name);
|
|
}
|
|
|
|
printunit(pool->ipld_unit);
|
|
|
|
if ((opts & OPT_DEBUG) == 0) {
|
|
PRINTF("/dstlist (name %s;", pool->ipld_name);
|
|
if (pool->ipld_policy != IPLDP_NONE) {
|
|
PRINTF(" policy ");
|
|
printdstlistpolicy(pool->ipld_policy);
|
|
putchar(';');
|
|
}
|
|
PRINTF(")\n");
|
|
} else {
|
|
putchar(' ');
|
|
|
|
PRINTF("\tReferences: %d\n", pool->ipld_ref);
|
|
if ((pool->ipld_flags & IPDST_DELETE) != 0)
|
|
PRINTF("# ");
|
|
PRINTF("Policy: \n");
|
|
printdstlistpolicy(pool->ipld_policy);
|
|
PRINTF("\n\tNodes Starting at %p\n", pool->ipld_dests);
|
|
}
|
|
}
|